There is currently no direct / easy way to determine if something has been built. This is also not such a useful concept as for simpler build systems, as certain rules (especially those that define storedValue to return Nothing ) will always be "rerun", but then very quickly decide that they do not need to run rules that depend from them. To shake is the same as repeating. I can come up with several approaches that best probably depend on your situation:
Mark interesting rules
You can mark each interesting rule (which creates something that requires loading) with a function that writes to a specific file. If this particular file exists, you need to download it. This may work a little better, as if you were doing several Shake attempts, and in the first one something was changing, and the second did nothing, the file would still be present. If that makes sense, use IORef instead of the file.
Use profiling
Shake has a pretty advanced profiling. If you pass shakeProfile=["output.json"] , a JSON file appears with a detailed description of what was created and when. Starts are indexed using Int, with 0 for the most recent run, and any runs that didn't build anything are excluded. If you have one rule that always works (for example, it is written to a dummy file with alwaysRerun ), then if something works at the same time, it is restored.
See the size of .shake.database
Shake has a database stored under shakeFiles . Each uninteresting launch will grow by a fairly small amount (~ 100 bytes), but a fixed size, taking into account your system. If he changed in size by a larger amount, then he did something interesting.
Of these approaches, tagging interesting rules is probably the easiest and most direct (although it risks forgetting to tag something).
source share