Skip to content
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

cabal-gild version range pragma and minimum version flag #104

Open
BebeSparkelSparkel opened this issue Jul 24, 2024 · 2 comments
Open

cabal-gild version range pragma and minimum version flag #104

BebeSparkelSparkel opened this issue Jul 24, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@BebeSparkelSparkel
Copy link

Just as with cabal-version it would be useful to have a cabal-gild-version [<version bounds>] pragma.

If the version bounds is not given, the bounds are filled in according to the cabal-gild pragmas and pragma arguments given in the cabal file.

If the version of the current cabal-gild is outside of the version bounds, cabal-gild should exit with a non-zero code. This feature should be added to the previous cabal-gild major versions.

@tfausak
Copy link
Owner

tfausak commented Jul 24, 2024

To be clear, you're suggesting a pragma like this?

-- cabal-gild: version ^>= 1.5.0

And then if you tried to use Gild 1.4 or 1.6 against that file, it would fail.

@tfausak tfausak added the enhancement New feature or request label Jul 25, 2024
@BebeSparkelSparkel
Copy link
Author

version has a name clash with my pr #101 so perhaps in the pr it should be changed to generated-with-version.

It seems that the bounds should match the cabal version bounds detailed in Version Constraints

Distribution.Types.VersionRange could be used to to easily parse this and withinRange to check the if the version is within the bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants