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

Upgrading replaced ghc-with-packages with ghc #23237

Closed
shanemikel opened this issue Feb 27, 2017 · 7 comments
Closed

Upgrading replaced ghc-with-packages with ghc #23237

shanemikel opened this issue Feb 27, 2017 · 7 comments

Comments

@shanemikel
Copy link
Contributor

I was a little surprised tonight to see that doing a nix-channel --update and nix-env --upgrade replaced my ghc 8.0.1 "with-packages" environment with the vanilla ghc 8.0.2.

Not a big problem, and I don't have time to investigate ATM, but it doesn't seem like the "right" behavior.

@domenkozar
Copy link
Member

What channel are you using?

@shanemikel
Copy link
Contributor Author

I'm using https://nixos.org/channels/nixpkgs-unstable nixpkgs. The update was from 78c68f2 to whatever was current yesterday... I think ab6d358

@peti
Copy link
Member

peti commented Mar 27, 2017

I cannot re-produce this. I'm using master at 6c116b8:

~/.nix-defexpr $ nix-env -p /tmp/test -q
ghc-8.0.2-with-packages
~/.nix-defexpr $ nix-env -p /tmp/test -u --always
~/.nix-defexpr $ nix-env -p /tmp/test -q
ghc-8.0.2-with-packages

If this has happened on your machine, then it's almost certainly a consequence of some peculiar override you have configured, i.e. Nixpkgs proper does not do this.

@peti peti closed this as completed Mar 27, 2017
@domenkozar
Copy link
Member

This probably happened when we switched haskellPackages to GHC 8.0.2, which is expected for the unstable to happen.

@peti
Copy link
Member

peti commented Mar 27, 2017

Yeah, you are right. This might happen when the user's GHC derivation is defined in terms of haskellpackages.ghc801.ghcWithPackages instead of haskellPackages.ghcWithPackages, because Nix will (correctly) consider ghc-8.0.2 an update to ghc-8.0.1-with-packages. If the user's GHC is defined in terms of the latest compiler, too, then Nix will update to ghc-8.0.2-with-packages instead. So this is all expected behavior, IMHO, no bug in Nix or Nixpkgs.

@domenkozar
Copy link
Member

Also why I discourage use of imperative package management, since package version upgrade paths are known to be fragile.

@peti
Copy link
Member

peti commented Mar 27, 2017

What we could do is call the GHC derivation ghc-with-package-8.0.2 instead. Not sure whether that's ultimately an improvement, but it would prevent this particular surprise from occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants