Better error messages for `bst track` for cross-junction elements
Summary
Error messages for bst track when junctions are involved do not contain enough information.
Steps to reproduce
junctions/junction-a.bst
kind: junction
sources:
- kind: git
track: master
url: upstream:foo/junction-a
ref: someref12345
org/repo-a.bst
kind: import
depends:
- junctions/junction-a.bst:root-junction-a.bst
sources:
- kind: git
track: master
url: upstream:org/repo-a
Contents of foo/junction-a repository
root-junction-a.bst
What is the current bug behavior?
Since the foo/junction-a project does not have a project.conf file, we get the following output when trying to run bst source track org/repo-a.bst:
[--:--:--][ ][ main:core activity ] START Track
[--:--:--][ ][ main:core activity ] START Loading elements
[00:00:00][ ][ main:core activity ] FAILURE Loading elements
[00:00:00][ ][ main:core activity ] FAILURE Track
Could not find element 'root-junction-a.bst' in elements directory 'elements'
which does not tell us much about the actual problem
What is the expected correct behavior?
Ideally, the error message should say something along the lines of
Junction 'junction-a.bst' does not point to a valid BuildStream project
Edited by Chandan Singh