[commit: ghc] ghc-8.4: Emit info-level log message when package envs are loaded (de3ade6)
git at git.haskell.org
git at git.haskell.org
Sun May 20 18:37:00 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.4
Link : http://ghc.haskell.org/trac/ghc/changeset/de3ade6080cebd7ed71d3b70556d31d509cca4b0/ghc
>---------------------------------------------------------------
commit de3ade6080cebd7ed71d3b70556d31d509cca4b0
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sun May 13 19:32:29 2018 +0200
Emit info-level log message when package envs are loaded
A common complaint with the new package environment files feature is
that it's not obvious when package environments have been picked up.
This patch applies the same strategy that was already used for `.ghci` files
(which exhibit similar potential for confusion, c.f. #11389) to package
environment files.
For instance, this new notification looks like below for a GHCi invocation which
loads both, a GHCi configuration as well as a package environment:
GHCi, version 8.5.20180512: http://www.haskell.org/ghc/ :? for help
Loaded package environment from /tmp/parsec-3.1.13.0/.ghc.environment.x86_64-linux-8.5.20180512
Loaded GHCi configuration from /home/hvr/.ghci
Prelude>
Addresses #15145
Reviewed By: bgamari, angerman
GHC Trac Issues: #15145
Differential Revision: https://phabricator.haskell.org/D4689
(cherry picked from commit 00049e2dce93b1e468c3fde3287371eb988aafdc)
>---------------------------------------------------------------
de3ade6080cebd7ed71d3b70556d31d509cca4b0
compiler/main/DynFlags.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 5e9003a..5b512a1 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4845,6 +4845,9 @@ interpretPackageEnv dflags = do
return dflags
Just envfile -> do
content <- readFile envfile
+ putLogMsg dflags NoReason SevInfo noSrcSpan
+ (defaultUserStyle dflags)
+ (text ("Loaded package environment from " ++ envfile))
let setFlags :: DynP ()
setFlags = do
setGeneralFlag Opt_HideAllPackages
More information about the ghc-commits
mailing list