-
Notifications
You must be signed in to change notification settings - Fork 841
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
Default to using a stack-installed, isolated GHC #2537
Conversation
I expect that this change will break a lot of CI scripts, e.g. those that use hvr's repo to install various GHC versions. Should I highlight this more in the Changelog? |
@@ -861,7 +861,7 @@ ghcVariantParser hide = | |||
readGHCVariant | |||
(long "ghc-variant" <> metavar "VARIANT" <> | |||
help | |||
"Specialized GHC variant, e.g. integersimple (implies --no-system-ghc)" <> | |||
"Specialized GHC variant, e.g. integersimple" <> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's still implied, no? Or is it now legal to use --system-ghc=... --ghc-variant
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's still implied, no?
I guess that depends on how one understands "implies": I read it as "changes default settings" (in this case from --system-ghc
to --no-system-ghc
), while you seem to read it like "requires".
I haven't been able to test --ghc-variant <sth-non-standard>
on Ubuntu-16.04 (I didn't try very hard) but according to #816 it's intended to be used only with --no-system-ghc
.
I don't think --ghc-variant
should silently override a user's --system-ghc
setting, so how about I add (incompatible with --no-system-ghc)
to the CLI help line?
I'd also add a check that errors out if both --ghc-variant X
and --system-ghc
are passed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both your proposals are good. FWIW I understand "implies" like you do, I had just misunderstood the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I meant to write (incompatible with --system-ghc)
above BTW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally didn't notice and the discussion made sense anyway. But I need coffee...
I think this probably should at least go in the Major Changes section to make it more likely to be noticed by someone skimming the changes. |
I agree. |
@YPares: I'm not sure how this change affects Nix users. Could you take a look at that? |
LOL, here we go: https://travis-ci.org/commercialhaskell/stack/jobs/155970348 |
The |
Auto-installing GHC when needed would silently fix the issue with setup scripts. I assume that's a bad idea for some reason, but maybe that should be reconsidered? As long as Stack can be trusted to install a good GHC, that seems a fine default. The main downside, IIUC, is if GHC can't be trusted to install a good GHC, says on Linux platforms (HVR mentioned issues with Ubuntu 16.10 recently — no GHC bindist works there). |
@sjakobi Well, for it to work with nix I have to pass |
I remember we hashed this out a long time ago, and it boiled down to most people having a preference for not being "surprised" by Stack going ahead and installing GHC without being asked to. There's no technical reason one way or the other. The |
Just some ideas to throw out there. There are a number of people who really prefer to use system-installed GHCs. While it may be problematic as a default, we shouldn't make these people suffer through typing
I think this will give us a situation where unexpecting users don't accidentally use a broken system install and determined users can easily use that install. CI scripts will suffer for this (which is really unfortunate), but at least the fix will be as easy as adding |
The same probably applies to Docker. |
While we're at it, perhaps also including |
If we do that, should we hardcode an ad-hoc subset of config.yaml or support arbitrary keys? If we decide to hardcode some, let's pick an interface that is a subset of what we have later. ( |
pinging @drwebb, who has done some thinking and work around supporting |
Do you mean https://docs.haskellstack.org/en/stable/yaml_configuration/#system-ghc or are you asking for something different?
To modify project If we want to modify the global configuration (
👍. We should probably check whether it's the right version of GHC too.
I agree. To be clear, the BTW, I believe that all the "non-project config" options can currently also be specified in project-local |
Sounds good, I'd simply forgotten that the global configuration would be included (shows how long since I've worked on the codebase...). |
I think ultimately we want to support arbitrary keys. #115 somewhat tracks this idea, although currently only for
👍 |
I don't understand what you're trying to express here. Can you expand a bit? |
Also, to keep the |
Please don't put too much weight on my comments, the syntax was intended as strawmen, and you're in a better position to decide on the exact syntax. |
Just expressing that my mind is porous and I forgot many relevant details On Wed, Aug 31, 2016, 8:55 PM Simon Jakobi [email protected] wrote:
|
You could have |
Gotcha! ;)
Not at all! Your design input here is very valuable even if you aren't aware of each and every new stack feature! The |
1184c74
to
4f29f24
Compare
Ok, I'll give that a try a then. Thanks for testing! |
@sjakobi Sounds like you have a handle on it :) Awesome! |
While it's probably not your responsibility, if (big if) we're all supposed to be able to test Nix support, could you please still document a recommended installation method? As a Nix noob, googling for a few minutes doesn't tell me what I need, and I'm afraid I can't risk messing up my system. Among the top 3 results for "installing nix", I assume you mean neither of https://nixos.org/wiki/Installing_Nix_on_Debian or https://nixos.org/wiki/How_to_install_nix_in_home_(on_another_distribution), and suspect that I should follow http://nixos.org/nix/download.html. That still mentions no "nix profile script" and neither does http://nixos.org/nix/manual/#chap-quick-start. And neither reassures me Nix will leave everything else alone—in fact, the example below makes no sense since none of the commands shown should be able to modify the PATH:
|
@Blaisorblade The nix documentation https://github.com/commercialhaskell/stack/blob/master/doc/nix_integration.md indeed refers to http://nixos.org/nix/download.html . But I'll add this part to the doc anyway, yes. |
Thanks for pointing me to stack docs on nix integration, they seem really great, and installing Nix is not remotely invasive, unlike I feared. |
1fcdc4e
to
c5f7d14
Compare
What's still missing here is mostly a fix for the integration tests. I'm not sure what to do about them yet, so if anyone has an idea, please chime in! I'll probably get back to this tomorrow or on Tuesday. |
Sorry for the basic question, but for the integration tests, why isn't |
Looks pretty good to me so far @sjakobi ! I think this can be merged soon. I do not see the code changes for |
I guess you're right, for fixing the integration tests that might just about be enough! We could still add tests that use a sandboxed GHC later.
|
Also RE In my implementation, the Sadly this means that
The |
That's an implementation restriction right? Can you document it as such for now? |
Address option compatibility issues around the new default setting: * Add notes to ghc-variant and setup --reinstall help texts * Add a check to catch uses of ghc-variant in combination with no-system-ghc
Error out if `--no-system-ghc` is specified in a Nix-enabled configuration.
… to `stack setup`
c9a0917
to
76a6562
Compare
[CI skip]
I have opened #2707 to discuss this. Is this what you meant by "Can you document it as such for now?" or would you like to see other documentation of this too? |
I think this issue is ready for a final review now. Sorry it took me so long! |
Read #2707, so I get it: using We need user docs for |
@sjakobi These changes look great! I just realized that the |
Closes #2221.