Description
This is related to #3883 but it is a distinct problem so I wanted to make a ticket for it by itself.
Some ghc-options don't have any affect on build outputs, e.g., -v
, but if someone specifies it via ghc-options
, e.g., in their cabal.project file, it will cause us to rebuild all deps because elabProgramArgs
has changed, which changes the hash, which means we need to rebuild. This is not good.
It's unclear how to go about fixing this. We could build in knowledge to cabal-install what arguments should and should not be hashed. But we'd be constantly chasing the most up-to-date set, and there would always be some time where we wouldn't have gotten it exactly right. Alternately, we could let the user specify, "use this option when building, but don't include it in the hash." But here it seems easy for a user to shoot themselves in the foot, ESP when it's a package being installed to the global store; worst case scenario you'd have to blow away the entire store because you corrupted it.
CC @bgamari who reported this most recently.