Skip to content

Cabal does not always rebuild when TH dependency changes #7862

Closed
@zliu41

Description

@zliu41

HLint's EmbedData.hs uses embedFile to load data/hlint.yaml at compile time. embedFile registers the file as a dependency via qAddDependentFile.

When hlint.yaml is modified, and if at least one source hs file is also modified, then cabal correctly rebuilds EmbedData.

However, if we only modify hlint.yaml itself, then cabal v2-build simply prints Up to date and terminates, without building EmbedData.

Environment: GHC 8.10.7, Cabal 3.6.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions