Skip to content

Cabal 3.8 does not appear to track extra-source-file rebuilds correctly #8632

Closed
@michaelpj

Description

@michaelpj

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

It's large, but here's the reproducer: https://github.com/input-output-hk/plutus

cabal build plutus-core:plutus-core
# edit plutus-core/cost-model/data/builtinCostModel.json
cabal v2-build plutus-core:plutus-core
# observe no recompliation

Expected behavior

Since there is a file that depends on plutus-core/cost-model/data/builtinCostModel.json using addDependentFile, I would expect modifying it to trigger a rebuild.

System information

  • NixOS
  • cabal 3.8.1
  • ghc 9.2.4

Additional context

We've confirmed that this works on cabal 3.6.2, and not on 3.8.1. I've tried a few semi-random things to try and get cabal to notice the change:

  • Move the file to the package root to avoid directory separators in the pattern.
  • Remove all the other extra-source-files
  • Explicitly add a call to addDependentFile <path> to the relevant module.
  • Changing to use a wildcard match on the file extension
  • Bumping the cabal-version of the cabal file
  • Add the package directory to the extra-source-file path in case there was a CWD mixup and it was looking from the project root somehow.

None of these have worked.

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