Skip to content

Only load package environment file once when starting GHCi

Matthew Pickering requested to merge wip/t19650 into master

Since d880d6b2 the parsing of the environment files was moved to parseDynamicFlags, under the assumption it was typically only called once. It turns out not to be true in GHCi and this led to continually reparsing the environment file whenever a new option was set, the options were appended to the package state and hence all packages reloaded, as it looked like the options were changed.

The simplest fix seems to be a clearer specification:

Package environment files are only loaded in GHCi during initialisation.

Fixes #19650 (closed)

Merge request reports