Teach Hadrian to persist the flavour?
One of the major motivations for using bgamari/hadrian-util> is to avoid having to remember and repeatedly pass the --flavour argument to Hadrian. One way to avoid this would be to:
- On every invocation Hadrian writes the flavour used to
$BUILD_ROOT/flavour - Make the
--flavourflag optional, defaulting to the "last" flavour used to compile the selected build root by reading it from$BUILD_ROOT/flavour - To avoid surprises: If
--flavouris not given and$BUILD_ROOT/flavourdoes not exist, the build should arguably fail, asking the user to give an explicit flavour (instead of using thedefaultflavour as we do now)
I'm a bit torn on this in general; making a build system implicitly stateful without a clear configuration step seems like a bit of a smell to me. On the other hand, this particular change does seem pretty benign and unlikely to cause surprises.