Repository navigation
Improve the handling of .ghc.environment files - #5711
Conversation
| , cleanDistDir :: Flag FilePath | ||
| { cleanSaveConfig :: Flag Bool | ||
| , cleanVerbosity :: Flag Verbosity | ||
| , cleanDistDir :: Flag FilePath |
There was a problem hiding this comment.
Style curiosity question: why is this formatting so common? It results in so much whitespace noise in diffs because whenever you remove, rename, or add a longer entry you need to re-indent everything else. You also end up with inconsistency when one of the entries is really long and needs to hang on the next line (or results in the other entries being separated by a lot of whitespace).
There was a problem hiding this comment.
It's subjective of course, but having things nicely aligned helps you see the structure rightaway; if it isn't aligned it's more diff friendly but otoh it adds cognitive overhead for the human programmer to see the structure. Also, it's not that bad; you can come up with heuristics for realigning which reduce the diff-noise and deal with overlong entries...
There was a problem hiding this comment.
GitHub diff viewer allows ignoring whitespace noise in diffs (?w=1 IIRC). I also usually separate formatting commits from meaningful ones.
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-7.6.3" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-7.8.4" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-7.10.3" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-8.0.2" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-8.2.2" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-8.4.4" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-8.6.2" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"linux-8.4.4-fdebug-expensive-assertions" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"osx-7.8.4" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"osx-8.0.2" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"osx-7.10.3" }
"url":"pull/5711", "account":"haskell", "repo":"cabal", "commit": "78cc5a66711caeed2010e1af29440bef2e608129", "tag":"osx-7.10.3" }
Improve the handling of .ghc.environment files (cherry picked from commit cd37f73)
| -- | Whether 'v2-build' should write a .ghc.environment file after | ||
| -- success. Possible values: 'always', 'never', 'ghc8.4.4+' (the | ||
| -- default; GHC 8.4.4 is the earliest version that supports | ||
| -- '-pkg-env -'). |
There was a problem hiding this comment.
-package-env?
GHC-8.0.1 seems to support -package-env.
Am I missing something?
There was a problem hiding this comment.
FWIW, -package-env is also the only option with env in it which ghc --show-options knows.
There was a problem hiding this comment.
Fixed the comment. It's about -package-env - (note the dash), which disables package environments, was added in GHC 8.6, and then backported to 8.4.4. See https://ghc.haskell.org/trac/ghc/ticket/13753 and https://downloads.haskell.org/~ghc/8.4.4/docs/html/users_guide/8.4.4-notes.html#compiler.
.ghc.environmentfiles. Fixes Add config flag to control generation of .ghc.environment files #4542.new-cleanto also remove.ghc.environmentfiles. Fixes new-clean/v2-clean does not clean env files #5587.This is the final blocker before the 2.4.1.0 release.
I haven't updated the docs yet, will do tomorrow.
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!