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

Add a warning when a deprecated package is used in the build plan #9522

Open
coot opened this issue Dec 15, 2023 · 2 comments
Open

Add a warning when a deprecated package is used in the build plan #9522

coot opened this issue Dec 15, 2023 · 2 comments
Labels
cabal-install: solver re: deprecated packages and versions Concerning handling of packages and versions deprecated on the package repository type: enhancement

Comments

@coot
Copy link
Collaborator

coot commented Dec 15, 2023

Right now cabal will not warn that it picked a deprecated package. It could be forced by a .freeze file or an explicit constraint.

It maybe be related to #8939.

@coot
Copy link
Collaborator Author

coot commented Dec 15, 2023

Ideally there would be a flag --allow-deprecated (and a cabal.project option allow-deprecated), similar to --allow-{newer,older}, which explicitly allows cabal to use deprecated package version in the build plan. Packages which are deprecated are deprecated for a reason, and it's rather surprising when they are picked by cabal constraint solver.

This actually gives control to the end user, and to a package maintainer. Maintainers no longer will need to use base < 0 trick on hackage, which seems like a hack around missing --allow-deprecated option.

@philderbeast
Copy link
Collaborator

This is for deprecated versions isn't it and not for whole package deprecations?

Deprecating a version adds a range which excludes just that version. All of this information is collected in the preferred-versions file that's included in the index tarball. [maintainers: edit]

If all the available versions of a package are non-preferred or deprecated, cabal-install will treat this the same as if none of them are. This feature doesn't affect whether or not to install a package, only for selecting versions after a given package has decided to be installed. Entire-package deprecation is also available, but it's separate from preferred versions.
SOURCE: https://hackage.haskell.org/package/binary/preferred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: solver re: deprecated packages and versions Concerning handling of packages and versions deprecated on the package repository type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants