juergbi commented on code in PR #2113:
URL: https://github.com/apache/buildstream/pull/2113#discussion_r3137702352
##########
tests/format/junctions.py:
##########
@@ -922,7 +929,7 @@ def test_include_vars_optional(cli, datafiles, use_species,
expected_result):
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.parametrize(
"target",
- ["target.bst", "subproject.bst:target.bst"],
+ ["target.bst", "subproject.bst:target.bst",
"intermediate-project.bst:subproject.bst:target.bst"],
ids=["toplevel-target", "subproject-target"],
Review Comment:
New ID is missing, blocking pytest.
```suggestion
ids=["toplevel-target", "subproject-target", "nested-link-target"],
```
##########
src/buildstream/_loader/loader.py:
##########
@@ -128,6 +128,15 @@ def load(self, targets):
for target in targets:
with PROFILER.profile(Topics.LOAD_PROJECT, target):
+
+ # As we are attempting to load a subproject element via the
+ # command line ensure fully loaded.
+ #
+ # Other callers of `_parse_name` or `_load_file` that reference
+ # files through a project element or otherwise do not need to
+ # ensure fully loaded.
+ self.project.ensure_fully_loaded()
Review Comment:
Unfortunately, this loading is too eager, resulting in a regression of #1686.
I'm trying to find an alternative fix that avoids that regression.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]