Description
Describe the bug
While --builddir is documented to be not honoured when defined the project-specific config file cabal.project, it is neither honoured when set in ~/.cabal/config, even though the attribute is even present as a comment in said file.
This is either undocumented or a bug. If it is also ignored there "by design" then it is a feature which is sorely lacking as it makes the CLI option --builddir= nearly useless if it has to be specified every single time explicitly adding 15+ characters to every cabal invocation.
To Reproduce
Steps to reproduce the behavior:
$ mkdir test; cd test
$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
$ grep builddir ~/.cabal/config
builddir: build
$ cabal init; cabal v2-build
<snip>
$ ls -A1
dist-newstyle
CHANGELOG.md
Main.hs
Setup.hs
test.cabal
Note that the build directory is dist-newstyle and not build.
Expected behavior
Honour the configuration in ~/.cabal/config.
System information
- Linux Ubuntu 19.10
- The Glorious Glasgow Haskell Compilation System, version 8.8.3
- cabal-install version 3.2.0.0
- compiled using version 3.2.0.0 of the Cabal library
Additional information
Apparently, merged pull request #2608 once was supposed to fix this, but the behaviour got lost somehow in the meantime?
Related to Issue #5271 is related, but that addresses the acknowledged (ie. documented) lacking support of the setting in cabal.local. That old issue also claims the premise that new-/v2--commands generally do not obey the --builddir= command line flag. However, as of the reported version (cabal 3.2.0.0) an explicit --builddir=... is honoured.
Activity
phadej commentedon May 25, 2020
Duplicate of #5271