Behaviour of inheriting cabal flags for cabal install
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I find it very confusing that `cabal install --only-dependencies -fbuildBenchmark` also uses the `buildBenchmark` flag transitively for installing the dependencies.
I [came across this problem](https://github.com/JPMoresmau/eclipsefp/issues/104) when using EclipseFP. Two of my projects actually have the `buildBenchmark` flag and one requires GHC >=7.6 to build, the other GHC >=7.4. On my machine I only had GHC 7.4 installed and therefore made a tick in the EclipseFP GUI for the `buildBenchmark` flag only for the GHC 7.4 project. But when it installed its dependencies, the flag got passed over to the other library and then caused a build failure, as it required GHC 7.6.
If I understand it correctly, the current `-fflag` behaviour is "global" meaning that flags are used for all dependencies in a `cabal install` command. So, in order to not break backwards-compatibility why not introduce an option so that flags are only "local", that is, only valid for the immediate projects, and not its dependencies?
Contributor guide
Assessment
This issue has not been assessed yet.