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
--flavour
flag optional, defaulting to the "last" flavour used to compile the selected build root by reading it from$BUILD_ROOT/flavour
- To avoid surprises: If
--flavour
is not given and$BUILD_ROOT/flavour
does not exist, the build should arguably fail, asking the user to give an explicit flavour (instead of using thedefault
flavour 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.