Skip to content

Support addDependentDirectory #11089

@TeofilC

Description

@TeofilC

https://gitlab.haskell.org/ghc/ghc/-/merge_requests/14473 is adding a new addDependentDirectory method to TemplateHaskell. This is analagous to the addDependentFile method that TemplateHaskell already has.

The recompilation support for that is tracked here: #4746

In short, GHC currently doesn't expose an appropriate interface to tell cabal-install about which files are tracked by TH. There is a workaround though. If we add the files to extra-source-files, then cabal-install will recompile when they change.

I have done some testing and the same workaround will not work for addDependentDirectory. It seems that even if I specify wildcards in extra-source-files, cabal-install will not recompile if new files are matched by the wildcard or old matches are removed.

I am proposing that if extra-source-files includes a wildcard, then we should recompile if the set of matches changes.

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