Set `CABAL_VERSION` environment variable when calling out to executables
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I couldn't figure out if there is already something like this in place, but I think it may be useful to have this kind of information available to programs called by the Cabal library. Or rather, I see no downside to provide this information, even if programs don't need it _yet_. OTOH, changes like https://phabricator.haskell.org/D1780 do occur from time to time. And Cabal has no way to know about future GHC versions, however, GHC can know about past (incompatible) Cabal versions.
With such an environment variable `ghc-pkg` or `ghc` could optionally inspect the `CABAL_VERSION` environment variable, and warn (or adapt their behaviour) if the Cabal library version is known to be unaware of recent changes in GHC's behaviour.
/cc @ezyang
UPDATE: #415 is somewhat related
Contributor guide
Assessment
This issue has not been assessed yet.