Log if there are multiple local packages with the same ID in a project#11487
Open
edmundnoble wants to merge 4 commits intohaskell:masterfrom
Open
Log if there are multiple local packages with the same ID in a project#11487edmundnoble wants to merge 4 commits intohaskell:masterfrom
edmundnoble wants to merge 4 commits intohaskell:masterfrom
Conversation
b8c559d to
e4db588
Compare
geekosaur
requested changes
Feb 14, 2026
Strictly speaking it could return `(a, a, [a])` or `(a, NonEmpty a)` or something, but this at least makes `head` safe. Co-authored-by: Hécate Kleidukos <Kleidukos@users.noreply.github.com>
Co-authored-by: Hécate Kleidukos <Kleidukos@users.noreply.github.com>
e4db588 to
b2ae916
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11140 by logging a message of the form:
It works for remote source repos + other remote repos as well, though it doesn't try to be too smart about printing remote source repo information to avoid verbosity.
Note: this message is only ever printed if the entire package identifier is duplicated between local packages, which includes both name and version.
One thing I'm not sure about here is how many packages already do this. Unfortunately clc-stackage is seemingly irrelevant as a test case here because cabal.project is the real issue. I'm also not sure if cabal2nix or haskell.nix generates project environments where this sort of message would be triggered a lot.
This PR modifies behaviour or interface**
Include the following checklist in your PR:
significance: significantin the changelog file.