Improve error reporting when files are not found
This branch improves error reporting in a few ways, especially regarding LoadErrorReason.MISSING_FILE errors.
Fully qualified element names are now printed in provenance information
Whenever there is an error in the parse, the fully qualified element name, including the junction name prefix will be printed.
This should help users to more quickly identify that an error originates from a subproject they are using.
Provenance is not included in LoadErrorReason.MISSING_FILE errors
As specified in #947 (closed), these errors were previously not mentioning where a file was referred to (lacking provenance), this is fixed, so that an error like this:
Could not find element 'missing.bst' in elements directory '/home/user/project/elements/'
Now looks more like this:
manual.bst [line 4 column 2]: Could not find element 'missing.bst' in elements directory '/home/user/project/elements/'
This will display the provenance of the dependency referring to the missing entity. The provenance will of course not be included for missing files specified on the command line.
Mention junction names instead of element paths for missing files across junction boundaries
As specified in #947 (closed), display the name of the junction instead of displaying the element path where a junctioned subproject is staged by BuildStream, in the case of missing files in sub projects.
This changes errors which look like this:
manual.bst [line 4 column 2]: Could not find element 'missing.bst' in elements directory '/home/user/project/.bst/staged-junctions/junction.bst/9dsf8s0e9fes0987sz98f098sadf097/elements'
To look more like this:
manual.bst [line 4 column 2]: Could not find element 'missing.bst' in project referred to by junction element 'junction.bst'