[Scons-dev] scons daemon

Schleimer, Ben bensch128 at yahoo.com
Thu Dec 24 18:57:44 EST 2015


Hi,   I was wondering if anyone else was interested in such a feature.I found on google that it was discussed before (gmane.org seems to be down right now) but that nothing was actually implemented. 

The reason to have a build daemon is to keep the dependency tree in memory for rebuilds and to try to keep the builds up to date as quickly as possible. Build systems like gradle and bazel seem to rely on a daemon (and VS C# and Eclipse uses background compiles extensively)

My tentative thoughts about how to design this are as follows:1) Build a wrapper py script that peers with scons.py to make it a bit simpler at first2) when the daemon starts, it builds the dependency tree and extracts a list of all source files. It uses watchdog (or some other inotify-like library) to watch for changes in all of the source files.3) Whenever a source file is changed, the file is copied to a temporary directory
4) As the source files change, the daemon rebuilds the dependency tree in memory
5) After an idle period, the daemon begins building the out of date targets. As it builds each target, the target is copied to it's proper location in the original source tree. During the build, dependency tree updating and source file copying is disabled but the watched files are still marked as dirty6) Once the build is complete, dependency tree updating and source file copying are re-enabled.
I am just starting to go through and examine all of the core scons source in depth but does this sound like a reasonable approach? What is missing? Are there dependency situations which could cause this scheme to fail?What about the pre and post build scripts?

Sincerely,Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20151224/d5cd69f1/attachment.html>


More information about the Scons-dev mailing list