haskell / haskell/cabal

SetupWrapper compilation as part of v1-build doesn't take --with-ghc into account

Open
#6,749 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**

When compiling Setup v1-configure will use the compiler passed in `--with-ghc` but v1-build will ignore the same flag and use the one on $PATH. Since the Cabal lib versions available are likely to be different for the two different compilers we then get a Cabal version mismatch error when running `Setup build`.

**To Reproduce**

```
$ PATH=/opt/ghc-8.4.4/bin:$PATH
$ cabal v1-configure --with-ghc=ghc-8.6.5
$ cabal v1-build # passing --with-ghc would be ignored for setup compilation
Saved package config file is outdated:
• the Cabal version changed from Cabal-2.4.0.1 to Cabal-2.4.1.0
• the compiler changed from ghc-8.6 to ghc-8.4
Re-run the 'configure' command.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.