Skip to content

Commit 11a68f5

Browse files
authored
[Workspaces] Fix conanws.yml requiring 'ref' specification (#19115)
Fix conanws.yml requiring 'ref' specification
1 parent 1a1d509 commit 11a68f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

conan/api/subapi/workspace.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,11 @@ def _init_options(conanfile, options):
263263

264264
def super_build_graph(self, deps_graph, profile_host, profile_build):
265265
order = []
266-
packages = self._ws.packages()
266+
packages = self.packages()
267267

268268
def find_folder(ref):
269-
return next(p["path"] for p in packages if RecipeReference.loads(p["ref"]) == ref)
269+
return next(os.path.dirname(os.path.relpath(p["path"], self._folder)) for p_ref, p in
270+
packages.items() if p_ref == ref)
270271

271272
for level in deps_graph.by_levels():
272273
items = [item for item in level if item.recipe == "Editable"]

test/integration/workspace/test_workspace.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,11 @@ def test_workspace_defining_only_paths():
11171117
assert "liba/0.1@myuser/mychannel - Editable" in c.out
11181118
assert "libb/0.1 - Editable" in c.out
11191119

1120+
c.run("workspace super-install")
1121+
assert "app1/0.1 - Editable" in c.out
1122+
assert "liba/0.1@myuser/mychannel - Editable" in c.out
1123+
assert "libb/0.1 - Editable" in c.out
1124+
11201125

11211126
def test_workspace_defining_duplicate_references():
11221127
"""

0 commit comments

Comments
 (0)