I think blacklisting whole files is one of the safest ways to work since we try and keep all the code reasonably modular - Waveform especially should work really well if the file is just left out of the build.
But maybe defines are the way forward - as you note I think Waveform is the only thing where you can't disable it some other way so rather than trying to build some complex addition, we could just change that.
However I do wonder how much flash memory will be saved by disabling it - not much I imagine.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think blacklisting whole files is one of the safest ways to work since we try and keep all the code reasonably modular - Waveform especially should work really well if the file is just left out of the build.
But maybe defines are the way forward - as you note I think Waveform is the only thing where you can't disable it some other way so rather than trying to build some complex addition, we could just change that.
However I do wonder how much flash memory will be saved by disabling it - not much I imagine.