-
Notifications
You must be signed in to change notification settings - Fork 701
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
Confusing error message when project contains duplicates in 'packages' declaration #6197
Comments
I can reproduce this with master, but it doesn't seem to happen when the |
First good step to debugging would be to expand that error message to contain more info: which two packages are duplicated?
I won’t be surprised if it’s b.cabal which is duplicated, as it’s implied by default `packages` in `cabal.project`
… On 19 Aug 2019, at 18.52, Daniel Gröber (dxld) ***@***.***> wrote:
I can reproduce this, but it doesn't seem to happen when the packages: declaration is in cabal.project file (as would be normal) instead of cabal.project.local. Strange.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ah, you're totally right!
I guess this is just confusing behaviour and not a bug then. |
@DanielG as you are on it, what happens if one have
or
If all three fail, then we have "bad error message" problem. Otherwise, we have inconsistent behavior which is a bug. |
All fail with the same error. |
@DanielG good. Then the task is clear: someone have to improve the error message. (I'm not implying you have to do it). I'd say, we shouldn't imply that multiple |
I had a look at the code and I might have a crack at the cabal file thing when I have some motivation actually. Seems to me like there's just some hooking-up required. We should still detect real duplicates though since those don't really make sense even if you can have multiple packages in one directory. |
|
I think the least surprising thing, if there are two identical |
for those coming in searching by this error message, I got it when I accidentally duplicated the |
Removing any extra copies of |
Partially addresses haskell#6197
I came across this problem when I put the |
Partially addresses haskell#6197
Partially addresses haskell#6197
Partially addresses haskell#6197
Partially addresses haskell#6197
Partially addresses haskell#6197
Partially addresses haskell#6197
Partially addresses haskell#6197
I still experience this problem with |
That's probably the best choice. The only drawback is that when a user instead of "a, b, c" writes "a, b, a", no error would be printed at this point. Not sure how common such kinds of typos are. We could warn, perhaps. |
Describe the bug
I see the following behavior:
To Reproduce
Set up a directory that matches mine:
Navigate to the
b
directory, then runcabal v2-repl
.System information
The text was updated successfully, but these errors were encountered: