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

Add exceptions and stm to nonReinstallablePkgs #1183

Closed
wants to merge 1 commit into from

Conversation

locallycompact
Copy link
Contributor

Fixes #1177

@hamishmack
Copy link
Collaborator

It might be better to set nonReinstallablePkgs in a module in the project in question (by passing modules = [{nonReinstallablePkgs = [...];};). Changing the default might result in an old version of exceptions or stm being used on projects using older GHC version.

@locallycompact locallycompact force-pushed the master branch 2 times, most recently from e7601a8 to c6af901 Compare August 3, 2021 05:16
@locallycompact
Copy link
Contributor Author

I don't understand what you have in mind. I've changed it so it only acts on 9.0.1 now.

@hamishmack
Copy link
Collaborator

I can't seem to access https://github.com/locallycompact/haskell-nix-ghc-bug (I just get a 404), but if I understand the issue correctly it does not build unless we add exceptions and stm to nonReinstallablePkgs. We should normally be able to do that in the project rather than changing it globally in haskell.nix. Something like:

project = haskell-nix.cabalProject {
  src = ...;
  modules = [{
    nonReinstallablePkgs = [...];
  }];
};

@locallycompact
Copy link
Contributor Author

Thanks, its public now.

This would need to be on for every ghc 9 project IIUC so why would we not want it globally?

@hamishmack
Copy link
Collaborator

why would we not want it globally?

For anything in nonReinstallablePkgs haskell.nix will ignore the version selected by the cabal solver or stack resolver. Even setting it for ghc 9.0.1 would be a problem. If a new versions of exceptions or stm was uploaded to hackage it would make it hard to use them.

@ocharles
Copy link
Contributor

Is there anything I can do to help this? I believe it's what's blocking ocharles/weeder#68 (https://github.com/ocharles/weeder/runs/3220946774)

@hamishmack
Copy link
Collaborator

For now I think ocharles/weeder#81 is the best work around.

Adding dependencies of GHC to the default nonReinstallablePkgs is not ideal.

A better fix would be to modify the way nonReinstallablePkgs works. It might be possible to make it automatic. It could include only packages where the version matches the version of the package that comes with ghc (as well as the versions of all the dependencies of that package).

Fixing modules = [{ reinstallableLibGhc = true; }]; for GHC 9.0.1 would also provide a nicer work around. When it works reinstallableLibGhc clears out nonReinstallablePkgs and makes ghc just a regular package. Currently it is failing with:

...
Building library for transformers-compat-0.6.6..
Preprocessing library for ghc-9.0.1..
Building library for cryptonite-0.29..
Setup: can't find source for GHC/Settings/Config in ., dist/build/autogen,
dist/build/global-autogen

@ocharles
Copy link
Contributor

Another ping here, I really do think we should do something that means Haskell.nix can be used with GHC 9 out-of-the-box. Especially now that Stackage LTS is on 9.0.

hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
hamishmack added a commit that referenced this pull request May 10, 2023
We did not merge #1183 because we were concerned that it would change the  exceptions and stm used for users that did not want to build GHC. However `reinstallableLibGhc = true` is now the default and most projects should not be setting it to `false`.  That means this change will now only affect projects that likely want to use the built in `ghc` package.
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.

installed package ghc-9.0.1 is broken due to missing package exceptions-0.10.4
3 participants