-
Notifications
You must be signed in to change notification settings - Fork 703
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
Can we have if impl(cabal <3.10)
project conditionals?
#8933
Comments
if impl(cabal <3.10)
conditionals projects?if impl(cabal <3.10)
project conditionals?
Imports were only released in 3.8, and I consider the behavior that has now been changed simply a bugfix. Even if we added such constraints (I have reservations about them in general) they wouldn't apply to the now released 3.10 version of cabal, so couldn't resolve this specific issue. I would propose just writing files that work with 3.10, or re-architecting the project so that imported project files are in the same directory as the cabal.project importing them. In general, while we worry about cabal files being compatible with a wide range of Cabal-the-library versions, this is because such files are packaged up in tarballs and backwards-compat is essential. Project files just live in source repositories, and are easier to update, and for development purposes its therefore much more straightforward to update them "in place" or specify they only work with a specific cabal version. This is to say that in general there is no policy for ensuring cabal.project files are compatible between different cabal-install versions, and further that such a policy would be exceedingly difficult, as their allowed flags are coupled to the allowed flags between cabal-install versions, which are likely to change with every major release. |
If "there is no policy for ensuring cabal.project files are compatible between different cabal-install versions" then an I can't imagine how hard it would be to manage compiling with different ghc versions without having access to |
With the behaviour of packages in imports changing between
cabal-3.8.*
andcabal.3.10.*
(see #8795), how can I work around this?We have conditionals in project files but I don't see an
if impl(cabal <3.10)
in the docs.The text was updated successfully, but these errors were encountered: