Re: bst operations from within workspaces



Hi Daniel,

On Thu, 2017-11-30 at 10:18 +0000, Daniel Playle wrote:
`bst` currently operates relative to `project.conf` in the project
directory. This means that when it comes to the current workflow for
workspaces, one must switch between the workspace and the bst project
directory as part of the development cycle.

To provide a smoother experience, I'd like to see `bst` also operate
from within open workspaces. This would require some mapping from the
workspace to the associated project directory.

I agree, this sounds useful to me.

To achieve this, we can provide an implicit mapping by opening
workspaces within a subdirectory of the project directory by default
(we could call this `bst-workspaces` within the project directory,
for instance). In this case, we can simply walk up the tree until we
find the project directory. 

Thinking about this, it may not be ideal that a BuildStream project
directory is identified by a file with the relatively generic name
'project.conf'. However, I don't expect any significant issues with
this in practice and simply walking up the directory hierarchy makes
sense.

This will also be convenient for running `bst` in the elements
subdirectory, and it matches the behavior of git. We should probably
stop walking up the directory hierarchy at filesystem boundaries (git
does the same, if I remember correctly).

I'm not sure whether we really need to define a fixed name for the
subdirectory of the project directory, though. Do you see an issue with
the user simply specifying a path, as is already the case now?

For the case where a user does not wish to have their workspace
reside within their project directory, we can read the location of
the project directory from some environment variable to still afford
the ability to invoke `bst` in these workspaces.

Yes, this would be similar to GIT_DIR. Sounds straight forward to me.
BST_DIR?

Jürg


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]