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

Allow reinstall of filepath in GHC 9.4.8 #2224

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

hamishmack
Copy link
Collaborator

A cabal flag (vendor-filepath) was used to avoid the template-haskell dependency on filepath in the version of template-haskell (2.19.0.0) used by ghc 9.4.8.

    if flag(vendor-filepath)
      other-modules:
        System.FilePath
        System.FilePath.Posix
        System.FilePath.Windows
      hs-source-dirs: ./vendored-filepath .
      default-extensions:
        ImplicitPrelude
    else
      build-depends: filepath
      hs-source-dirs: .

The dummy-ghc code in haskell.nix does not evaluate conditionals (instead it just includes all of the dependencies. This leads to issues where the planner is unable to come up with a plan because it thinks filepath cannot be reinstalled.

This fix works around the by hard coding a rule for vendor-filepath.

A cabal flag (`vendor-filepath`) was used to avoid the `template-haskell` dependency on `filepath` in the version of `template-haskell` (2.19.0.0) used by `ghc` 9.4.8.

```
    if flag(vendor-filepath)
      other-modules:
        System.FilePath
        System.FilePath.Posix
        System.FilePath.Windows
      hs-source-dirs: ./vendored-filepath .
      default-extensions:
        ImplicitPrelude
    else
      build-depends: filepath
      hs-source-dirs: .
```

The `dummy-ghc` code in haskell.nix does not evaluate conditionals (instead it just includes all of the dependencies.  This leads to issues where the planner is unable to come up with a plan because it thinks `filepath` cannot be reinstalled.

This fix works around the by hard coding a rule for `vendor-filepath`.
@hamishmack hamishmack self-assigned this Jul 2, 2024
@hamishmack hamishmack merged commit 0e97cea into master Jul 2, 2024
86 checks passed
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.

1 participant