You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cabal: Always pass -package-env=- to supported GHC versions
Issue #10759 highlighted the issue that we were not isolating the calls
to ghc from the existence of environment files.
This manifested in a terminal bug where extra arguments form the
environment file were causing a link failure which was due to a
combination of #10692.
However, even before this bug the test executable was relinked to due to
the extra flags from the environment file.
```
Building test suite 'aeson-schemas-test' for aeson-schemas-1.4.2.1...
Loaded package environment from /home/runner/work/aeson-schemas/aeson-schemas/dist-newstyle/tmp/environment.-69233/.ghc.environment.x86_64-linux-9.6.6
Loaded package environment from /home/runner/work/aeson-schemas/aeson-schemas/dist-newstyle/tmp/environment.-69233/.ghc.environment.x86_64-linux-9.6.6
[23 of 23] Linking /home/runner/work/aeson-schemas/aeson-schemas/dist-newstyle/build/x86_64-linux/ghc-9.6.6/aeson-schemas-1.4.2.1/t/aeson-schemas-test/build/aeson-schemas-test/aeson-schemas-test [Flags changed]
```
The correct solution is that calls to `ghc` made by `Cabal` should never
implicitly use an environment file. This is similar to how
`GHC_PACKAGE_PATH` is treated.
Fixes#10759
0 commit comments