-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(manager): add Cabal/Haskell manager using Hackage/PVP #33142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me, but please rewrite regex
Packages cannot start with a hyphen. But they can start with a number: - https://hackage.haskell.org/package/3d-graphics-examples They can be a single uppercase character: - https://hackage.haskell.org/package/H They can be a single lowercase character: - https://hackage.haskell.org/package/j
@zharinov I have replaced the regex with validation that rejects more invalid package names. |
Could you provide couple repos for testing? For example, fork of some existing one that have many deps, with Renovate configured for it |
@zharinov Yes, this is the configuration file that I use for testing, named
I compile renovate using
I just ran this, and it made PRs: |
Sorry to have invalidated the review, but this should now be ready for review again. Per the Slack discussion in #general, I have improved the handling of |
@secustor You requested in #31434 that I split up the work in at least three PRs. I have done this, and this constitutes the third PR in the series. I am planning further work in separate PRs though, like e.g. adding support for rangeStrategy=pin in the PVP versioning module. But that will be in an upcoming PR, because it is somewhat orthogonal to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a reference to the real repo you have used to test this manager.
Co-authored-by: Sebastian Poxhofer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else LGTM
Co-authored-by: Sebastian Poxhofer <[email protected]>
Co-authored-by: Sebastian Poxhofer <[email protected]>
This reverts commit 0938656.
@secustor Thanks for all your comments, I am not sure how to further advance this. Not sure if Rhys is waiting for the green check mark? |
I had to do a small change, but else LGTM. Thanks for the patience and contribution! |
🎉 This PR is included in version 39.107.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@ysangkok I have an example where the manager breaks some of the surrounding comments: https://github.com/PostgREST/postgrest/pull/3861/files It also adds a trailing comma, which is invalid syntax. |
@wolfgangwalther Thank you for the bug report regarding the comment and the trailing comma, I'll look into that. I'll add it to my issue tracking in the discussion page. |
Changes
The Haskell programming language has a package manager called cabal-install, commonly referred to as 'Cabal'. It's package definition files have the extension
.cabal
.This PR contains code to extract
build-depends
fields from.cabal
files.The build-depends field syntax is documented here.
This was tested on the repo https://github.com/ysangkok/haskell-tz (as you can see in the pull requests tab)
Context
For a discussion on this particular feature, see discussion at
Note that this doesn't contain support for
package.yaml
files which are usedwith hpack.
package.yaml
files are used to generate the cabal files.So
.cabal
file support could be considered more general,since it covers all packages uploaded to Hackage.
However,
.cabal
files do use a custom syntax which requires a bit of work to parse.That is the bulk of this PR.
This PR also doesn't contain code to bump e.g. git commit references in
stack.yaml
which is mentioned in issue #8187.This is already implemented in projects like stack-lint-extra-deps,
so I consider it less pressing.
Even though these are largely orthogonal features, they can reuse the
Hackage/PVP code previously added.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: