-
Notifications
You must be signed in to change notification settings - Fork 843
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
Support specialized GHC bindists (#530) #816
Conversation
So excited to see work on this! While this might only affect a small slice of the My 0.02 💵:
My last thought is how this relates to custom snapshots. Is it possible for a custom snapshot to specify a GHC variant? That would be ideal I think, since the two will often go hand-in-hand, sometimes necessarily (in other words, some variants, like |
|
I'm not sure about this. In some cases they would go hand-in-hand, but in other cases they don't (e.g., a GHC build that fixes a bug but is fully compatible). I don't think GHC variants should be entirely coupled with custom snapshots, but having a snapshot be able to require a particular variant like it requires a GHC version probably does make sense. |
@borsboom Yes, that's exactly what I was thinking too. |
Just to get it on the table, I can conceive of a uniform system for custom things (both GHC variants and snapshots). Let's say it were possible to derive a custom snapshot from some other snapshot. Then the overhead of a custom snapshot to achieve a custom GHC variant would be minimal. Since snapshots are currently responsible for determining GHC version, this seems like a more consistent model. For example: # stack.yaml
resolver
name: my-resolver1
location: my-resolver1.yaml # myresolver1.yaml
compiler:
name: ghc-bugfix
version: 7.10.2
location: ...
packages:
import: lts-3.1 # not a major fan of this example, but you get the idea |
I've pushed initial work on support for downloading custom GHC variant bindists. The
The --ghc-variant argument supports values like:
Questions/comments:
|
I very much like the idea of stack-setup.yaml subset in stack.yaml. I could imagine having the stack.yaml contents being automatically merged with the stack-setup.yaml contents, and possibly replacing those contents (nice for companies that want to avoid connecting to an external server).
|
A somewhat tangential idea: perhaps there should be some way of overriding the compiler version when using a snapshot, e.g. "I want to use LTS 3.2, but set the GHC version to 7.10.1 instead." I can especially see that as useful when wanting to play with GHC HEAD. Does that fit in here? If not, I'll put it in a separate issue. |
I think that's a separate issue. |
Awesome! Would using the term @snoyberg Your tangential idea fits nicely with my hope for drivable snapshots. I realize that "derivative snapshot" might not have simple semantics, but it seems that if feasible it could provide a lot of usefulness. With our without drivable snapshots, I have a sense that moving all "custom" things to custom snapshots would provide a more uniform design. Essentially I imagine that folks could theoretically build stackage snapshots themselves. |
I hope my "grand vision" comments aren't holding this back from incremental improvements. Any status? |
I don't think this has much interaction with GHCJS, except that we won't support some of the variants. I do plan on adding |
@3noch, have you tried the code in this PR to make sure it works for your use case? |
Looks like it's getting close:
|
By the way, now that For using extra-deps:
# these are in the snapshot but we need to override their flags
- hashable-1.2.3.3
- scientific-0.3.3.8
- text-1.2.1.3
# avoid LPGL dependency (integer-gmp)
flags:
hashable:
integer-gmp: false
scientific:
integer-simple: true
text:
integer-simple: true |
0f5891a
to
58ce1d3
Compare
- Don't require separate msys2 installation for each GHC variant (local programs directory no longer includes GHC variant, instead each GHC variant is installed in a separate subdirectory of local programs) - Specify additional SetupInfo in stack.yaml, either inline or pointing to external file/URL - Add `stack setup --ghc-bindist` argument, instead of including the bindist URL with custom `--ghc-variant` - `stack setup` messages include GHC variant name - stack-setup.yaml GHC key generated for any GHC variant, not just "known" combinations
@3noch I've pushed fixes to the issues you raised:
Now it'll indicate the variant in most
I think this now is at the point where it can be merged to master, which I'd like to do today. Also: I tested the integersimple with the |
9fb651b
to
1bab31b
Compare
@borsboom Sweet. I can't wait to test it out. |
By |
@3noch: git is one part of what gets installed with msys2. |
…c-bindists Support specialized GHC bindists (#530)
@3noch @snoyberg: Here's my work so far on this #530. I have some questions I'd like feedback on before I go further:
-gmp4
to the dist subdirectory (e.g.x86_64-linux-gmp4
), which means people already on such a system will end up having to re-runstack setup
and their packages will all be re-built. Is that going to be acceptable? I think in the long-run this is the right thing to do, since it means if they upgrade their system to one with libgmp5, things will work properly rather than it trying to use a libgmp4 GHC/build anyway. (A: this is OK)ldd
). I tried moving that into BuildConfig instead, so it only has to do so when actually going to build something, but since Stack.Setup needs it (and Stack.Setup doesn't have a BuildConfig) that didn't work. I'm thinking I could add a SetupConfig for that case, or another way might be to use RunOnce to only perform the detection when it's actually needed. Opinion? (A: moved into BuildConfig)--os=windowsintegersimple
no longer works (you'd use--ghc-variant=integersimple
instead). Is it worth having it print a warning for this case? I'm not under the impression that very many people are using--os=windowsintegerimsple
. (A: no need to print warning)--ghc-variant
is effectively ignored. Should--ghc-variant
imply--no-system-ghc
? (A: yes, should imply --no-system-ghc)Additional tasks: