Building same project in parallel can result in errors #2730
I got errors like the following when running
/home/mgsloan/fpco/stack/src/main/Main.hs:96:1: Bad interface file: /home/mgsloan/fpco/stack/.stack-work/dist/x86_64-linux/Cabal-126.96.36.199/build/Stack/Types/Compiler.hi mismatched interface file versions (wanted "7103", got "8001")
This is due to the dist directory being shared. We could have lock files on the dist directory. However, it would be better if we allowed parallel builds of different configurations. So how do we vary the dist dir location for different configurations? One tricky constraint is that
Either way, we'd also want to have lock files on the dist dirs, since we do want to prevent simultaneous execution on the same dist dir.
I'm favoring approach (2), because it would allow for a common case to work well without even knowing about
referenced this issue
Dec 23, 2017
Just ran into a similar situation where my editor triggered a build while another manual build was running.
Locking would also address this "use-case".