Skip to content

Improve the handling of .ghc.environment files - #5711

Merged
23Skidoo merged 5 commits into
haskell:masterfrom
23Skidoo:dont-generate-env-file-setting
Nov 25, 2018
Merged

23Skidoo merged 5 commits into
haskell:masterfrom
23Skidoo:dont-generate-env-file-setting

Conversation

@23Skidoo

@23Skidoo 23Skidoo commented Nov 23, 2018 •

Copy link
Copy Markdown
Member

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:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@23Skidoo 23Skidoo added this to the 2.4.0.1 milestone Nov 23, 2018
@23Skidoo
23Skidoo requested a review from hvr November 23, 2018 23:53
, cleanDistDir :: Flag FilePath
{ cleanSaveConfig :: Flag Bool
, cleanVerbosity :: Flag Verbosity
, cleanDistDir :: Flag FilePath

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub diff viewer allows ignoring whitespace noise in diffs (?w=1 IIRC). I also usually separate formatting commits from meaningful ones.

haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-7.6.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-8.2.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-8.4.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-8.6.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"linux-8.4.4-fdebug-expensive-assertions"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"osx-7.8.4"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"osx-8.0.2"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 24, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"osx-7.10.3"
}
haskell-pushbot pushed a commit to haskell-pushbot/cabal-binaries that referenced this pull request Nov 25, 2018
"url":"pull/5711",
"account":"haskell",
"repo":"cabal",
"commit": "78cc5a66711caeed2010e1af29440bef2e608129",
"tag":"osx-7.10.3"
}
@23Skidoo
23Skidoo merged commit cd37f73 into haskell:master Nov 25, 2018
@23Skidoo
23Skidoo deleted the dont-generate-env-file-setting branch November 25, 2018 15:37
23Skidoo added a commit that referenced this pull request Nov 25, 2018
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 -').

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-package-env?

GHC-8.0.1 seems to support -package-env.

Am I missing something?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, -package-env is also the only option with env in it which ghc --show-options knows.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@23Skidoo thanks for clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants