-
Notifications
You must be signed in to change notification settings - Fork 701
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
new-freeze: write with-compiler
line to freeze file
#4071
base: master
Are you sure you want to change the base?
Conversation
In order for a freeze file generated by `new-freeze` to make sense we need to record the compiler that was used. Moreover, this bypasses the confusing error messages you'd get from the solver if the freeze file isn't compatible with the currently selected compiler. As it's tradition for compilers such as `gcc` or `clang`, GHC's build-system installs version suffixed symlinks of the `ghc` executable, so we can exploit that to document/record/freeze the compiler version.
If I run |
No; it only records the compiler id which doesn't contain a path. |
So, if I get a freeze file from someone and don't have the compiler in my path, it's going to complain "cabal: Cannot find the program 'ghc'. User-specified path 'ghc-7.10.3' does not refer to an executable..."? That doesn't seem so good? Also, if I pass in a It seems like you really want a proper "compiler-version" field rather than coopting the existing "with-compiler" |
@ezyang well, what I actually want is for cabal to find the proper GHC version (i.e. the user shouldn't be required to redundantly specify the matching ghc executable if there is one reachable via $PATH). If instead we use a new PS: Also, when the freeze file says |
I'm sympathetic to your goal, but the concerns I raised above still hold ;) Won't things be better if we have per-GHC freeze files? In this case, you shouldn't end up in a situation where you try to use a freeze file for the wrong version of GHC. |
We talked a bit about this on IRC, and it may indeed make sense to have a separate field from The semantics I'd like are based on the presence of
NB: I don't suggest that the solver picks the compiler-version (even if it could) at this point PS: There's also a
Then |
I think this is an OK design, though a bit special casey (there's no way to control what GHCs |
Looks like this PR is not going to be merged in its current state, can we close it for now and open an issue about adding |
I've mostly resigned myself to the idea that we'll have some indefinitely open PRs in the Cabal repo :) I'll let @hvr decide what he wants to do here. |
Silly point, would |
@alanz |
I believe this feature should be merged as-is, possibly behind a cli flag if people deem that necessary. It can be improved later. |
@hasufell: would you make that happen? I'd help. I guess, at least we should rebase, address old review comments as much as feasible and review again. |
I might have a look at it. I'm currently neck-deep in ghcup-windows support stuff. Is there a schedule for the next release? |
AFAIK the scope of the next release is mostly closed, unless there is a good reason to squeeze something in, so no hurry, unless you'd personally need it ASAP. As far as I'm concerned, I'd just hate to see lots of good brainstorming and motivation coming from user experience go to waste, hence prodding. :) |
Anybody willing to give this PR a prod? Or comment? |
I think the objections to merging this approach still hold, and don't think it makes sense to merge as is. |
Marking this PR as draft 🙂 |
#9021 is related to this issue. |
In order for a freeze file generated by
new-freeze
to make sensewe need to record the compiler that was used. Moreover, this bypasses
the confusing error messages you'd get from the solver if the freeze
file isn't compatible with the currently selected compiler.
As it's tradition for compilers such as
gcc
orclang
, GHC'sbuild-system installs version suffixed symlinks of the
ghc
executable,so we can exploit that to document/record/freeze the compiler version.