Describe the bug
Running multiple cabal builds at the same time will crash at least one of them with an error ghc-pkg-{...}: cannot create: {...}/dist-newstyle/packagedb/ghc-{...} already exists.
To Reproduce
$ cabal init # Use default options.
$ cabal clean
$ cabal build & cabal build
One of the two cabal builds should fail.
Expected behavior
cabal build succeeds regardless of if there are any other cabal builds running for the project.
System information
- Operating system: Ubuntu 24.04.4 LTS
$ cabal --version
cabal-install version 3.16.1.0
compiled using version 3.16.1.0 of the Cabal library (in-tree)
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.10.3
Additional context
#11329 and #11298 seem related, but there the error is about something under the global .cabal dir, not dist-newstyle.
Describe the bug
Running multiple
cabal builds at the same time will crash at least one of them with an errorghc-pkg-{...}: cannot create: {...}/dist-newstyle/packagedb/ghc-{...} already exists.To Reproduce
One of the two
cabal buildsshould fail.Expected behavior
cabal buildsucceeds regardless of if there are any othercabal builds running for the project.System information
Additional context
#11329 and #11298 seem related, but there the error is about something under the global
.cabaldir, notdist-newstyle.