-
Notifications
You must be signed in to change notification settings - Fork 710
One freeze-file per GHC version #7367
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
Comments
I agree, freeze file makes mostly sense for single compiler only. This is challenging. Freeze file is just a convention, it's not "special". It is an unrestricted appendix to I'm afraid that project configuration have to be reworked in some non-trivial way to support this. EDIT: an important constraint is that project configuration can be read in <10ms, to guarantee interactive-fast responses for no-build-op operations (e.g. |
We could partially get there by adding a |
By the way, the freeze file can be changed, just together with the main project file: This might be a nuisance when the project file is big and has to be copied multiple times, but it works, and symlinks can solve the duplication |
only want to note that symlinking in windows is not reliable in general |
I think that explicit includes (discussed on related ticket) plus allowing includes in conditional stanzas would give a way to do this, albeit not the most seamless ux for it. |
After getting explicit includes and |
Just wanted to note that it's not enough to have one per compiler version, it can also vary per platform. So in principle you need one per compiler-version/platform combination. |
It can also vary based on the output of |
This is already possible using imports1;
Then edit the project to import the compiler-specific freeze file guarded by a conditional; $ git diff
diff --git a/cabal.project b/cabal.project
index e368c280c..d71207795 100644
--- a/cabal.project
+++ b/cabal.project
@@ -4,3 +4,6 @@ import: project-cabal/pkgs.config
import: project-cabal/constraints.config
tests: True
+
+if impl(ghc == 9.8.2)
+ import: cabal.ghc-9.8.2.freeze Footnotes
|
We could add this to the cookbook section on reproducible builds. |
Another option is to have one project per GHC version. Each would then be individually freezable. That's what Updo does with its |
There should be one freeze file per GHC version (like there is a build directory per GHC version in v2-cabal). Otherwise, freeze does not work as expected in a multi-GHC environment. I expect
cabal v2-freeze -w ghc-x.y.z
to work analogously tocabal v2-build -w ghc-x.y.z
.Currently there is a single
cabal.project.freeze
.See also #2245.
The text was updated successfully, but these errors were encountered: