Skip to content

ignore an externally set $GHC_ENVIRONMENT #7792

@fgaz

Description

@fgaz

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions