Skip to content

Add compiler-nix-name to cabalProject #610

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

Merged
merged 4 commits into from
May 16, 2020
Merged

Conversation

hamishmack
Copy link
Collaborator

Setting the compiler explicitly does not make it easy for cross
compilation to also choose the correct compiler when compiling
build tools for the build platform. Also it is easy to pass the
wrong compiler type. Specifying just the nix-name of the compiler
makes that less likely.

Setting the compiler explicitly does not make it easy for cross
compilation to also choose the correct compiler when compiling
build tools for the build platform.  Also it is easy to pass the
wrong compiler type.  Specifying just the nix-name of the compiler
makes that less likely.
@angerman
Copy link
Collaborator

I guess we could try ghc.nix-name? Isn't that a passthrough? Unless someone feeds in a completey different ghc.

@hamishmack
Copy link
Collaborator Author

I guess we could try ghc.nix-name? Isn't that a passthrough? Unless someone feeds in a completey different ghc.

I worry someone might be using ghc = haskell-nix.compiler.ghc865.overrideAttrs {...} and it would break their code if cabalProject used buildPackages.haskell-nix.compiler."${ghc.nix-name}" instead.

Perhaps we should mention that they can use ghcOverride arg in the warning (to get rid of the warning)? But that still feels wrong, it might be better if they changed their code to add haskell-nix.compiler.X as an overlay and then used compiler-nix-name = "X";.

@hamishmack hamishmack requested a review from angerman May 16, 2020 02:05
@hamishmack hamishmack marked this pull request as ready for review May 16, 2020 02:05
@angerman
Copy link
Collaborator

Agreed.

@angerman angerman merged commit 788e198 into master May 16, 2020
@iohk-bors iohk-bors bot deleted the hkm/compiler-nix-name branch May 16, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants