Skip to content

Recompilation checking issue with multiple packages, --fast and TH #6248

Open
@TeofilC

Description

@TeofilC

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:

  1. Build everything
  2. Edits a file
  3. Only rebuilds the package that file belongs to
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions