-
Notifications
You must be signed in to change notification settings - Fork 22
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
Don't compare generated cabal files #7
Conversation
For an example of this bug, see commercialhaskell/stack#5045. Problem: pantry was including the hash of generated cabal files in lock files, and then when newly generated cabal files (based on new hpack versions) mismatched, it considered it a different package. Solution: do not store the hash of the generated cabal file, but instead of the source hpack file.
Turns out that these are no longer necessary at all. We cache the relevant information within the Pantry database, and just need name and version for quick checking. This bypasses the entire issue of mismatched cabal file information and keeps nicer backwards compat with existing lock files (just generates a warning for the `cabal-file` field).
Fixes #5045. See relevant PR for pantry for more details: commercialhaskell/pantry#7
Fixes #5045. See relevant PR for pantry for more details: commercialhaskell/pantry#7
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.
LGTM apart from a minor comment.
Fixes #5045. See relevant PR for pantry for more details: commercialhaskell/pantry#7
Fixes #5045. See relevant PR for pantry for more details: commercialhaskell/pantry#7
Fixes #5045. See relevant PR for pantry for more details: commercialhaskell/pantry#7
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.
Are we OK with just removing "cabal-file"? This will give us warnings when parsing e.g. lock files with dependencies from Github and those could be checked in into a VCS
That's a good point! It's a better idea to simply ignore the |
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.
LGTM
For an example of the bugs involved here, commercialhaskell/stack#5045.