-
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
base: main
Are you sure you want to change the base?
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 |
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.
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: