Open
Description
Summary
We noticed that some of our tests that used TH were sometimes not recompiling with stack. This led to stale test results.
I've managed to extract the following reproducer.
NB: this is reproducible with GHC 9.2.8 so it's not related to the recompilation changes in 9.4.
Steps to reproduce
Clone this repository https://github.com/TeofilC/stack-recomp-checking-issue.
Then run ./repro.sh
This does the following:
- Build everything
- Edits a file
- Only rebuilds the package that file belongs to
- Then tries to build the dependent package, which doesn't recompile <- the bug
Expected
I would expect the file to recompile even with --fast and cabal-install does this correctly, so it seems like this is a bug in stack rather than GHC/Cabal.
Actual
The file doesn't recompile.
I couldn't attach the verbose log as its too long, but should be easy to generate from the reproducer.
Stack version
stack --version
2.11.1 x86_64 hpack-0.35.2
Method of installation
nix
Platform
WSL2 x86_64