New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to hpack 0.20.0 (fixes #3383) #3579
Conversation
7483dd3
to
85cbc6f
Compare
src/Stack/Package.hs
Outdated
Hpack.ExistingCabalFileWasModifiedManually -> prettyWarnL | ||
[ cabalFile | ||
, flow "was manually modified but it is autogenerated," | ||
, flow "please delete and modify package.yaml in the future" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "please delete it" would be clearer, right now it could read as "delete + modify package.yaml". Perhaps it's not so ambiguous, but still best to be clear as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or something along the lines of
"WARNING: $cabalFile was modified manually. Ignoring package.yaml in favor of $cabaFile. If you want to use package.yaml instead of $cabalFile then please delete $cabalFile."
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, perhaps! Or it could just pre-emptively delete the cabal file! 👿 Hah probably people wouldn't appreciate that.
Perhaps it should just error in this circumstance. Hmm hmm, nothing seems to be quite perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more note: The reason why I added --force
to hpack
and why --force
is preferable to deleting the cabal file is, that hpack
does some effort to minimize diffs if a cabal file is already present. So hpack --force
and rm *.cabal && hpack
may lead to differently formatted cabal files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go with @sol's verbiage, I think the hpack author is likely the best to figure these things out anyway :)
LGTM just one comment |
85cbc6f
to
74c7ccd
Compare
74c7ccd
to
57af148
Compare
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!