Skip to content
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

Nix-shell no longer called with a GHC from an LTS mirror #2270

Merged
merged 3 commits into from
Jul 21, 2016
Merged

Conversation

YPares
Copy link
Collaborator

@YPares YPares commented Jun 15, 2016

As explained in #2259
we will soon no longer be able to give to nix-shell indentifiers like haskell.packages.lts-5_14.ghc
since LTS mirroring will be removed from the Nixpkgs.
This PR proposes to retrieve the wanted GHC version before creating the nix shell, which will now
always be called with derivations like haskell.compiler.ghc7103.
Until the lts mirroring is removed from Nix, this also provides the advantage that now you don't have to pay attention to which LTS you use into your stack.yaml

@YPares YPares changed the title Nix no longer uses the GHC from LTS Nix no longer uses the GHC from LTS mirror Jun 15, 2016
@YPares YPares changed the title Nix no longer uses the GHC from LTS mirror Nix-shell no longer calling with a GHC from an LTS mirror Jun 15, 2016
@YPares YPares changed the title Nix-shell no longer calling with a GHC from an LTS mirror Nix-shell no longer called with a GHC from an LTS mirror Jun 15, 2016
@YPares YPares force-pushed the nix-ghc-version branch from c3c42ab to 32e03c4 Compare June 15, 2016 10:46
@YPares
Copy link
Collaborator Author

YPares commented Jun 15, 2016

Ok, actually it did work because I already had in my $HOME/.stack the versions of GHC I tested, but EnvConfig cannot be loaded before a compiler can be found on the system.
(So I need a compiler to set up a compiler...)
So it's not mergeable right now until I fix this

@YPares YPares force-pushed the nix-ghc-version branch from 32e03c4 to ae8aa0b Compare June 15, 2016 12:59
@YPares
Copy link
Collaborator Author

YPares commented Jun 15, 2016

It's fixed now. I've tried it with several resolvers, both lts and fixed ghc versions.

@YPares YPares force-pushed the nix-ghc-version branch 2 times, most recently from 3a54ab0 to b8ad2a0 Compare June 15, 2016 13:22
@YPares
Copy link
Collaborator Author

YPares commented Jun 16, 2016

The CI error on OSX is rather weird, I'm getting right from the beginning of a fresh build:

Did not find .cabal file for yesod-core-1.4.20.2 with Git SHA of 5350ec333aa9ed6ae24e46142e33d2f851ace553
Right Nothing
Did not find .cabal file for wizards-1.0.2 with Git SHA of 525156becfe006b51f4e46b5e60c1bfbe3237336
Right Nothing
Did not find .cabal file for websockets-0.9.6.1 with Git SHA of 2f90616ee89447c142e535fecb5bdd407c14fa9a
Right Nothing
Did not find .cabal file for waitra-0.0.4.0 with Git SHA of 396179446c25a5f9e5ad931f09414f59e0bb4467
Right Nothing
Did not find .cabal file for wai-middleware-static-0.8.0 with Git SHA of 818e8bc0b3ebde0723a750aafb418e413437e78f
Right Nothing
Did not find .cabal file for uuid-1.3.12 with Git SHA of 79e931a867a5e3dd960b7e29426328fa73d69e00
Right Nothing
Did not find .cabal file for unix-compat-0.4.1.4 with Git SHA of e007b19ea18bb290e961f75812befc39dd1c3f49
Right Nothing
Did not find .cabal file for union-find-0.2 with Git SHA of d3241b27b99cf737fbad58f5cb9a4a3a27021ba0
Right Nothing
Did not find .cabal file for twitter-types-0.7.2.1 with Git SHA of 3be5081ac2a883993b7483ca9e44242102a36838
Right Nothing

However on my machine, on OSX, the build succeeds and stack test too. However here, the build of my three commits fails with the same "ghc not found in path" error.
Should I disregard this CI error?

@mgsloan
Copy link
Contributor

mgsloan commented Jun 16, 2016

I think I've seen the "ghc not found in path" error before. Some travis nondeterminism of some variety :/

The git sha thing isn't cause for concern, and is tracked by #2175

@mboes
Copy link
Contributor

mboes commented Jul 20, 2016

@mgsloan anything holding back the merge of this PR? Now that LTS snapshots have been removed from Nixpkgs, Stack --nix users are pretty stuck without this PR.

YPares added 3 commits July 20, 2016 13:46
We retrieve the right GHC version before calling
Nix.reexecWithOptionalShell
@mboes mboes force-pushed the nix-ghc-version branch from 071e9aa to 38854da Compare July 20, 2016 11:48
@mboes
Copy link
Contributor

mboes commented Jul 20, 2016

@YPares branch force pushed to resolve conflicts.

@mboes mboes merged commit a8ddaf0 into master Jul 21, 2016
@mboes mboes deleted the nix-ghc-version branch July 21, 2016 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants