Support for building from “local” source directories
This may not among the goals of BuildStream, but here goes a suggestion anyway...
As a developer, I would like to be able to use a controlled build environment to develop my library/application/thing. BuildStream seems to be good at that: I can use it already today to e.g. import the org.gnome.Sdk
runtime from its OSTree repository, and for building the dependencies needed by my project. Problem is: how would I go about building the code I am developing right now, which may contain local WIP changes (it may not even be in version control)?
The first idea which comes to mind is developing directly inside a shell launched by build-stream shell -s build
. Well, no: suddenly the developer's usual “gear” (editors, VCSs, fine-tuned configurations) are gone. Building my favorite editor (and tools, and configs) with BuildStream to have have them inside the sandbox seems ludicrous.
One though would be to write an element that makes a local directory available into the sandbox for building. Currently that involves staging the code into the sandbox (IIUC). While that can be okay for small-to-moderate sized projects, staging a full copy of the sources for a big project is slow and discourages doing quick edit-compile-test cycles. Probably one solution for this could be being able to bind-mount an existing checkout of the source tree inside the sandbox.
(Extra kudos if, when using a modern filesystem like btrfs
, what gets exposed into the sandbox is a read-only snapshot of the source directory.)