-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add command-line options --hash and --no-hash #390
Conversation
@snoyberg what behavior do you think will be appropriate for |
I honestly don't remember the discussion that led to hashes being included in the first place, or what problems the hashes were intended to solve. I can't think of a way this would break Stack, but I may not be remembering a corner case. Do you remember where we discussed this before? |
@snoyberg took me a while to dig it up, commercialhaskell/stack#3383 (comment). |
It looks like the original issue the hashes are meant to solve is: user edits cabal file instead of hpack file. There's a pretty clear warning at the top of the generated cabal file that it's autogenerated, and hpack files are probably better understood now than when that original issue opened. I wouldn't advocate for removing the hash, but I'm also not opposed to it. Entirely your call :) |
And thanks for doing the digging on finding that, and pinging me on the topic in the first place |
For people spending time reading every single line of this PR and yet have no clue how to disable existing hash: just delete your |
turns out I just need to regenerate this. "See details in sol/hpack#390" my ass.
@Javran this may not be obvious, but |
This is an alternative proposal for #381. It adds two new command-line flags,
--no-hash
and--hash
. A brief description of the semantics follows.Conceptually, there are four different modes, of which
hpack
exposes three to the user.ForceNoHash
(enabled with
--no-hash
, implies--force
)ForceHash
(enabled with
--hash
, implies--force
)PreferNoHash
(the default behavior for
hpack
)ForceNoHash
PreferHash
(not exposed, but available through the API)
ForceHash