Hi Simon,
> Regarding the Build System Shootout: should I prepare the version discussed here or do you
> prefer a variant which models unit-testing but depends on gcc?
For the Shootout I usually prefer versions that test one particular
build aspect in isolation. In this case it would probably be best just
to model running a command that produces no output but should only be
run if its dependencies change.
> If I understood the philosophy of tup rerunning a rule should never be required. There is no "clean" target and it is
> considered a bug if incremental results differ from those of a clean full rebuild. As far as I know, rules can only
> be indirectly triggered through their dependencies. Of course, one is always free to manually invoke the commands
> of a particular rule.
Yep, that's very much the tup philosophy. Shake disagrees with that
for a few reasons:
1) Sometimes the result of a command depends on things that are not
tracked, e.g. the presence/absence of directories, the $PATH variable
etc. In Tup these things are untracked, and can cause problems. In
Shake these things could be tracked, but realistically I don't think
anyone ever will.
2) Sometimes actions are non-deterministic. Imagine a QuickCheck test
that passes 99% of runs. Occasionally you want to just retry the build
action, and pretend the last time round didn't happen.
3) Sometimes you are not interested in the build-products, but
observations that happen while producing them - e.g. peak process RAM,
time until the first message on stdout, number of files read. It's
useful to rerun a specific part to collect that information with
system monitors.
4) Shake doesn't track the build system rules itself, so sometimes you
want to force a rebuild because the rules have changed. Tup does track
the rules, so this argument doesn't apply to Tup.
Thanks, Neil