buildstream/_project.py: Report if project.conf is missing name
Description
bst is incorrectly reporting that projectconf.yaml is the file with provenance when no name is given in project.conf. This stems from how _yaml.py node_get & node_get_provenance handle the reporting of LoadError when the node does not contain a given key. In this instance it defaults provenance to the conf file used for the generation of the pre_config_node in _project.py (as no specific key is passed to get_provenance), which is the default_config_node projectconf.yaml
The existing tests in format/project.py test_missing_project_name & test_empty_project_name behave as expected, differentiating between the two error types.
Changes proposed in this merge request:
- Assert the project.conf has a name before the continuation of loading & checking of the node
- Correctly report a LoadError to the user pointing at project.conf
This merge request, when approved, will close issue/bug: #591 (closed)
Edited by Tom Pollard