Question about build system

Since we now have a ‘Kaleidoscope Internals’ category, I figured I’d ask this here.

On every build (through IDE or on command line), everything is completely rebuilt, regardless of whether anything has changed since it’s last been compiled. Sketch is rebuilt, all plugins are rebuilt, even the Arduino core (which very, very rarely changes, especially for real-hardware builds) is rebuilt. Even typing make, waiting for it to complete, and then immediately typing make again triggers a full rebuild, even though nothing has changed.

  1. Is this a behavior that just comes with using arduino-builder? (I don’t think so - for most projects, I think Arduino normally tries to not recompile libraries and core unless necessary - but I could be wrong)
  2. If this behavior is a feature of kaleidoscope-builder, or more broadly our build system in general, can anyone point me to where in the code or config files is causing this?
  3. Is this a desired feature? If so, why? Or if it’s not a desired feature, I’m interested in fixing this. It would help build times a ton - for instance if you only changed your sketch file, not having to rebuild all the plugins and the Arduino core would save so much time. It also would speed up future regression testing (see Regression testing & build system) by probably at least 10x.
4 Likes

It is part of kaleidoscope-builder.

As far as I remember, we start from a clean state every build because we don’t really trust the arduino build tools to notice changes. I seem to recall cases where it didn’t pick up modifications in libraries…

What we could do, is to make the BUILD_PATH override-able, and then we could satisfy both camps: those who want a clean rebuild every time, and those who want quick builds.

The problem discussed above is addressed by Kaleidoscope-CMake

2 Likes