-
Notifications
You must be signed in to change notification settings - Fork 719
Open
Labels
Description
Describe the bug
A project tolerates duplicate packages but silently picks one of these to work with and doesn't report that two of its packages have the same name and version.
To Reproduce
I've added the test setup as a pull request, #11139, that has packages ./pkg-one/pkg-one.cabal
with module Foo.hs
and ./pkg-two/pkg-one.cabal
with module Bar.hs
. Only module Bar.hs
is being compiled.
$ cabal repl pkg-one
Configuration is affected by the following files:
- cabal.project
Build profile: -w ghc-9.10.2 -O1
In order, the following will be built (use -v for more details):
- pkg-one-0.1 (interactive) (configuration changed)
Configuring pkg-one-0.1...
Preprocessing library for pkg-one-0.1...
GHCi, version 9.10.2: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Bar ( Bar.hs, interpreted )
Ok, one module loaded.
ghci> :q
Leaving GHCi.
$ cabal repl all --enable-multi-repl
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Build profile: -w ghc-9.10.2 -O1
In order, the following will be built (use -v for more details):
- pkg-one-0.1 (interactive) (first run)
Preprocessing library for pkg-one-0.1...
GHCi, version 9.10.2: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Bar ( Bar.hs, interpreted )
Ok, one module loaded.
ghci> :q
Leaving GHCi.
Expected behavior
I'd expect this to be reported as an error.