I presume too that there's no real way around this. But perhaps it might be worth warning users about it somewhere in the documentation.
Leon
I'm a little confused by this. In this tiny example:
```
import Development.Shake
import Development.Shake.Command
import Development.Shake.FilePath
import Development.Shake.Util
import Data.Monoid
postgrestUrl :: String
postgrestUrl = "https://github.com/begriffs/postgrest/releases/download/v" <> ver <> "/postgrest-" <> ver <> "-ubuntu.tar.xz"
where
ver = "0.4.0.0"
main :: IO ()
main = shakeArgs shakeOptions{shakeFiles="_build"} $ do
want ["_build/postgrest.tar.xz"]
phony "clean" $ do
putNormal "Cleaning files in _build"
removeFilesAfter "_build" ["//*"]
"_build/postgrest.tar.xz" %> \out -> do
cmd "wget --no-verbose -O" [out] [postgrestUrl]
```
the rule runs as expected, and the file is downloaded correctly. However, I would have hoped that changing the value of `ver` would cause the executed command line to change, and hence a rebuild would cause shake to download the new version. Yet this doesn't seem to be the case. Presumably I am missing something simple?
I’m not sure why you expect it to rebuild - it’s not a “tracked” value
I guess I’d naively expected that the text passed to cmd
would be “tracked”, as this would include compiler flags etc. But presumably the monad structure of rules makes this impossible.
Now I’ve read the “Dependencies on extra information” section from the manual I can see my options here.
Thanks for the help.
Tim