[BuildStream] Proposal: bst commands don't fetch elements implicitly



Hi all,

This is a write up of a discussion which happened at the Manchester
gathering after originally being raised at [1].
If we wish bst to follow the principle of least surprise, we should
minimize the number of operations performed implicitly when invoking
bst commands. To this end, it is proposed here that we change the
default behaviour of bst commands such that sources are not fetched
unless this is explicitly requested.
Note that as this proposal would alter BuildStream's cli, any
implementation should be completed prior to the 1.4 release.
Current Behaviour
------------------------------
Currently BuildStream will automatically fetch sources which are not
cached when running the following bst commands:
- workspace open
- workspace reset
- source-bundle
- shell (with --build option)
- build
The exception to the above is junction elements, which are fetched at
load time by build, fetch, track, pull, push and checkout.
Proposed Behaviour
---------------------------------
Only `bst build` should fetch sources by default. There is an option
like --fetch for the remaining commands. These should only fetch
elements if this option is present.
If unfetched sources are required and the --fetch flag is not given,
the command should should fail and recommend the user run a bst fetch
command or the repeat the command with the --fetch option. Alternatively,
if running in interactive mode, the user should be presented with the
option to fetch, continue, quit etc.
Best regards,
Phil


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