Skip to content
Commit 9177ec6f authored by Chandan Singh's avatar Chandan Singh Committed by Jürg Billeter
Browse files

Make workspaces element-wide instead of source-specific

At present, BuildStream supports source-specific workspaces. This patch
makes workspaces element-wide. This will bring workspaces closer to what
the build area looks like inside the sandbox when the build actually
happens.

As part of this change, format of `.bst/workspaces.yaml` file will also
change. Previously, each element used to have a dict mapping each source
to its workspace directory. Now, each element will directly map to its
workspace directory.

If users have existing workspaces open, this patch tries to cope with it
but in some cases, it is not possible to reliably convert workspace
config from old format to new format. When an element has workspace open
for just one source, we assume that to be the workspace directory. But
if there were more than one workspaces associated with an element,
BuildStream will simply error out describing the issue.

Note that the actual contents of the workspace directory are not changed
in any case. So, if an element had multiple sources associated with it
but only had workspace open for source, the other sources will not be
automatically staged in the workspace unless the user runs `workspace
reset` or something equivalent.

Part of #209.
parent 315c4ef7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment