Some people are excited about .ghc.environment files, while others are mildly annoyed. I think there's probable cause to make this configurable on cabal's end.
To this end, I suggest (modulo bikeshed) to implement a flag, e.g. --pkg-environment-scope=LEVEL, where LEVEL can be one of
all (default & current behaviour, generate ghc env files with all transitive dependencies of project's (non-qualified) goals)
- build-target (e.g.
:pkg:Cabal or lib:Cabal or Cabal:test:parser-tests): generate ghc env files containing only the stated goal's /direct/ dependencies)
- (or none or off or disable?): disable generation of any ghc env files
This flag would also be persistable via cabal.project.(local).
Note: Item 2. is not the short-term goal of this feature request! I've included the 2. item mostly to motivate why it makes sense to design this to be a flag that's more than merely a boolean --{disable,enable}-package-environment-files flag.
Btw, a dual feature-request (allowing to opt-out from interpreting .ghc.environment files from GHC's side) has been filed at GHC #13753 -- however, that one will be too late for GHC 8.0.2 users.
Current status:
/cc @RyanGlScott
Some people are excited about .ghc.environment files, while others are mildly annoyed. I think there's probable cause to make this configurable on cabal's end.
To this end, I suggest (modulo bikeshed) to implement a flag, e.g.
--pkg-environment-scope=LEVEL, where LEVEL can be one ofall(default & current behaviour, generate ghc env files with all transitive dependencies of project's (non-qualified) goals):pkg:Cabalorlib:CabalorCabal:test:parser-tests): generate ghc env files containing only the stated goal's /direct/ dependencies)-(ornoneoroffordisable?): disable generation of any ghc env filesThis flag would also be persistable via
cabal.project.(local).Note: Item 2. is not the short-term goal of this feature request! I've included the 2. item mostly to motivate why it makes sense to design this to be a flag that's more than merely a boolean
--{disable,enable}-package-environment-filesflag.Btw, a dual feature-request (allowing to opt-out from interpreting .ghc.environment files from GHC's side) has been filed at GHC #13753 -- however, that one will be too late for GHC 8.0.2 users.
Current status:
-environment which inhibits the default lookup logic (see http://git.haskell.org/ghc.git/commit/8f3c149d94814e4f278b08c562f06fc257eb3c43)/cc @RyanGlScott