Hi Joachim,
The best way to figure out what is going on is usually to run with
shakeVerbosity=Diagnostic (-vvv on the command line), which prints out
everything it does and why. In particular, you can see what rebuilds,
what rebuilds and doesn't change etc. The output is very long and
designed so I can entirely debug peoples programs, but it does explain
everything.
The other option is to run profiling, for instance
--profile=profile.json (get some JSON and munge through it yourself)
or profile.html (get some HTML and use the user interface, which might
be a little complex to figure out). Alternatively, give me the output
from the profile and the name of the target you are interested in, and
I can tell you.
I have often thought that the cache should have an "answer" mode,
where you can ask "why did this rebuild" and get an answer. Maybe it
should also be a command line flag --explain=target says why the
target last rebuilt.
The other thing to do is augment writeFileChanged to print when it
decides to write out (I'd start by copying the Shake implementation
into your repo).
A quick look at the oracle and cache pieces reveals nothing untoward.
Thanks, Neil