summaryrefslogtreecommitdiff
path: root/docs/users_guide/packages.rst
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-04-12 18:09:03 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-18 11:09:32 -0400
commit40d2843686ecb08f9fce8691b833ba6517cfc6ec (patch)
tree9adf93b03ad0806620c117746a2564475dc91350 /docs/users_guide/packages.rst
parentc71b220491a6ae46924cc5011b80182bcc773a58 (diff)
downloadhaskell-40d2843686ecb08f9fce8691b833ba6517cfc6ec.tar.gz
Only load package environment file once when starting GHCi
Since d880d6b2e48268f5ed4d3eb751fe24cc833e9221 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
Diffstat (limited to 'docs/users_guide/packages.rst')
-rw-r--r--docs/users_guide/packages.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/users_guide/packages.rst b/docs/users_guide/packages.rst
index 837a444a74..ff6953ac8c 100644
--- a/docs/users_guide/packages.rst
+++ b/docs/users_guide/packages.rst
@@ -536,6 +536,10 @@ or ``ghci`` that are local to a shell session or to some file system location.
They are intended to be managed by build/package tools, to enable ``ghc`` and
``ghci`` to automatically use an environment created by the tool.
+In the case of ``ghci``, the environment file will be read once, during
+initialisation. If the file changes then you have to restart GHCi to reflect
+the updated file.
+
The file contains package IDs and optionally package databases, one directive
per line: