Open
Description
Describe the bug
haskell-language-server
has a cabal package of that name, which contains an executable of the same name.
That means that the haskell-language-server
target is ambiguous between:
- The package target
- The component target for
lib:haskell-language-server
- The component target for
exe:haskell-language-server
As a result, cabal says:
Error: cabal: Ambiguous target 'haskell-language-server'. It could be:
exe:haskell-language-server (component)
lib:haskell-language-server (component)
Somehow this doesn't bite if the executable isn't present, even though there is still an ambiguity between 1 and 2.
To Reproduce
Check out https://github.com/haskell/haskell-language-server and run cabal build haskell-language-server
.
Expected behavior
I think the package target should always win if it is ambiguous with a component target. You can always disambiguate in favour of the component target, but there is no other way to select the package target (and hence to build all components in the package).
System information
cabal-3.10
Activity