For this directory structure:
.
├── frontend
│ ├── _build/
│ ├── Build.hs
│ ├── build.sh
│ ├── other files ...
│ ├── Frontend.elm
│ ├── Index.elm
│ └── other elms ...
└── proto
└── frontend.proto
The goal _build/index.jsdepends on all files .elm, including Frontend.elm, but is Frontend.elmgenerated by the rule in Build.hs, if I blindly do:
want ["_build/index.js"]
"_build/index.js" %> \out -> do
elms <- filter (not . elmStuff)
<$> (liftIO $ getDirectoryFilesIO "" ["//*.elm"])
need elms
blah blah
want ["Frontend.elm"]
"Frontend.elm" %> \_out -> do
cmd ["protoc", "blah", "blah"]
build.sh clean would give me:
Lint checking error - value has changed since being depended upon:
Key: Frontend.elm
Old: File {mod=0x608CAAF7,size=0x53D,digest=NEQ}
New: File {mod=0x608CAB5B,size=0x53D,digest=NEQ}
Is there a way to tell shake to keep track of dynamically generated Frontend.elm, maybe first create it so that it does not change during the rest of the assembly, I tried priority 100 ("Frontend.elm" %> ...), it doesn’t work.
source
share