Different executable components using the same build plan
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I have this cabal file
```
name: test-components
version: 0.0.1
cabal-version: 1.12
build-type: Simple
license: AllRightsReserved
description:
executable component-a
main-is: Main.hs
build-depends:
base -any
default-language: Haskell2010
hs-source-dirs: src
executable component-b
main-is: Main.hs
build-depends:
base == 42.*
default-language: Haskell2010
hs-source-dirs: src
test-suite component-c
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends:
base == 42.*
default-language: Haskell2010
hs-source-dirs: src
```
And run `cabal new-build exe:component-a`. Then I get this message:
```
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: test-components-0.0.1 (user goal)
next goal: base (dependency of test-components-0.0.1)
rejecting: base-4.8.2.0/installed-0d6... (conflict: test-components =>
base==42.*)
rejecting: ...
```
Is this expected behaviour? I'd expect that build-plans for components are seperate. When I remove `component-b` and keep `component-c` with the same incorrect dependency I get no error (test-suite have a different status?).
The actual problem I ran into was two components that required different versions of a certain dependency and therefore dependencies could not be resolved.
Contributor guide
Assessment
This issue has not been assessed yet.