Skip to content

Allow older ghc versions in cabalProject #817

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 1 commit into from
Aug 14, 2020
Merged

Conversation

hamishmack
Copy link
Collaborator

Currently the dummy-ghc-data, nix-tools plan and cabal-install
plan must be materialized for the selected ghc. This change
relaxes that restriction and will instead use nix-tools and
cabal-install built with a fixed ghc version (currently ghc865)
and will calculate the dummy-ghc-data as an IFD.

It will __trace a warning of the form:

WARNING: No materialized dummy-ghc-data for ghc-8.6.4-x86_64-darwin.

Currently the `dummy-ghc-data`, `nix-tools` plan and `cabal-install`
plan must be materialized for the selected `ghc`.  This change
relaxes that restriction and will instead use `nix-tools` and
`cabal-install` built with a fixed `ghc` version (currently `ghc865`)
and will calculate the `dummy-ghc-data` as an IFD.

It will `__trace` a warning of the form:

```
WARNING: No materialized dummy-ghc-data for ghc-8.6.4-x86_64-darwin.
```
@@ -21,8 +21,8 @@ in
, caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
, ghc ? null # Deprecated in favour of `compiler-nix-name`
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
, nix-tools ? evalPackages.haskell-nix.nix-tools.${compiler-nix-name} # When building cabal projects we use the nix-tools
, cabal-install ? evalPackages.haskell-nix.cabal-install.${compiler-nix-name} # and cabal-install compiled with matching ghc version
, nix-tools ? evalPackages.haskell-nix.nix-tools-unchecked.${compiler-nix-name} # When building cabal projects we use the nix-tools
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the unchecked version now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unchecked versions fall back on ghc865 when the materialized files are not present.

@hamishmack hamishmack merged commit fa25a67 into master Aug 14, 2020
@iohk-bors iohk-bors bot deleted the hkm/optional-dummy branch August 14, 2020 07:22
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
Currently the `dummy-ghc-data`, `nix-tools` plan and `cabal-install`
plan must be materialized for the selected `ghc`.  This change
relaxes that restriction and will instead use `nix-tools` and
`cabal-install` built with a fixed `ghc` version (currently `ghc865`)
and will calculate the `dummy-ghc-data` as an IFD.

It will `__trace` a warning of the form:

```
WARNING: No materialized dummy-ghc-data for ghc-8.6.4-x86_64-darwin.
```
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