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

gen-bounds could use caret bounds and could be more concise #10265

Open
chreekat opened this issue Aug 20, 2024 · 1 comment
Open

gen-bounds could use caret bounds and could be more concise #10265

chreekat opened this issue Aug 20, 2024 · 1 comment

Comments

@chreekat
Copy link
Collaborator

chreekat commented Aug 20, 2024

Current behavior

Currently, gen-bounds produces help text and uses traditional bounds:

$ cabal gen-bounds
Warning: The package list for 'hackage.haskell.org' is 60 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...

The following packages need bounds and here is a suggested starting point.
You can copy and paste this into the build-depends section in your .cabal
file and it should work (with the appropriate removal of commas).

Note that version bounds are a statement that you've successfully built and
tested your package and expect it to work with any of the specified package
versions (PROVIDED that those packages continue to conform with the PVP).
Therefore, the version bounds generated here are the most conservative
based on the versions that you are currently building with. If you know
your package will work with versions outside the ranges generated here,
feel free to widen them.

containers >= 0.6.7 && < 0.7,
optics-core >= 0.4.1 && < 0.5,
text-ansi >= 0.3.0 && < 0.4,

Suggested behavior

Put help text under --help and use caret bounds:

$ cabal gen-bounds
Warning: The package list for 'hackage.haskell.org' is 60 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...

containers ^>= 0.6.7,
optics-core ^>= 0.4.1,
text-ansi ^>= 0.3.0,

Rationale and context

Caret bounds are the right tool for the given job.

Removing the help text is just something I thought of at the last second when I was copy/pasting the output and finally read it all for the first time.

@mpickering
Copy link
Collaborator

Perhaps one argument for the current behaviour is that it's easier to edit the bounds if they have lower and upper bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants