
Brandon Allbery wrote:
The whole point of them is to enable doing things that no tooling can sanely automate, enabling the environment from those builds to be available to do those things.
From my own perspective, I expect that changing the working directory does not change the behavior of ghci except for where it looks for
I think the complaint is not about the functionality at all, but about the fact that this environment information is picked up implicitly. This is exacerbated by the fact that the resulting diagnostic messages are poor. source code. This is somewhat broken by .ghci files, but one can opt out of these; ideally I'd like local .ghci files to be opt in, and only $HOME/.ghci be parsed by default. So that's what I would advocate: ghc's functionality to use these local (CWD-based) environment files should be disabled by default and enabled by a command line switch. It's unfortunate that this functionality has been present since ghc 8.0 but has gone unnoticed until now that cabal-install actually uses it, so cabal-install gets most of the blame. But at the very least it should be easy to opt out of this functionality. So https://ghc.haskell.org/trac/ghc/ticket/13753 will help. Cheers, Bertram