haskell / haskell/cabal

ignore an externally set $GHC_ENVIRONMENT

Open
#7,792 6 comments 0 reactions 0 assignees View on GitHub
attention: pr-welcome cabal-install: environment-files type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Currently a bogus `$GHC_ENVIRONMENT` can make cabal fail. Cabal itself could trigger this issue if it's called inside a `cabal exec` (though this is probably a terrible idea in the first place). Local and default environments instead do not cause any interference.

Should we always pass `-package-env=-` to ghc, or set `$GHC_ENVIRONMENT` to `-`?

I think yes:

* Cabal manages the set of packages it passes to ghc on its own, so why should it be affected by external environments?
* I don't see any use for passing an environment to cabal
* it can cause inscrutable errors

on the other hand:

* resetting a variable that may heve been explicitly set by the user does not sound good

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.