haskell / haskell/cabal

hookedPreProcessors do not re-run preprocessors when their code is changed

Open
#5,114 0 comments 0 reactions 0 assignees View on GitHub
Cabal: custom Cabal: hooks type: bug type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

I've added a preprocessor to the build hooks in `Setup.hs` like `simpleUserHooks{ hookedPreProcessors = (".myext", myPreprocessor):knownSuffixHandlers }`.

When I change the logic of `myPreprocessorHandler` and run `runhaskell Setup.hs configure && runhaskell Setup.hs build`, the preprocessor does NOT get rerun on all `.myext` files. It only gets rerun when I touch the `.myext` files, or obviously after `runhaskell Setup.hs clean`.

This makes it difficult/confusing to iterate when writing the preprocessor.

I could understand why it wouldn't be rerun on only `build`, but I'd expect at least `configure` to pick up the change, or doesn't this make sense?

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior using the Setup.hs hookedPreProcessors configuration, then trace how configure and build decide whether .myext files need preprocessing. Verify whether changing myPreprocessorHandler causes all affected files to rerun, and add coverage for the expected invalidation behavior if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.