Commit 3e5f475
committed
Use file monitoring for preprocessor re-run (#11411)
This replaces the previous preprocessor re-run logic ("if the
preprocessor output exists and is newer than the input, don't re-run the
preprocessor") with a file monitor, which takes both the input file and
the preprocessor itself into account, solving #11411.
To make this possible, each preprocessor is now tagged with a hash that
uniquely identifies the specific preprocessor version.
The process of finding the actual preprocessor (`runPreProcessor`) to
run has been split off from the actual running; this was necessary so
that we can get a unique hash of the preprocessor (including version)
without having to actually run it, while also avoiding duplicate work
and a potential mismatch between the hash and the actual preprocessor.
Hence, we now have `configurePreProcessor`, which returns a pair of the
former `runPreProcessor` action and the preprocessor hash.1 parent 77bc27e commit 3e5f475
6 files changed
Lines changed: 234 additions & 124 deletions
File tree
- Cabal/src/Distribution/Simple
- PreProcess
- cabal-testsuite/PackageTests/Regression/T11411
- repo/alex-3.4.0.0/app
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
0 commit comments