(image: Image, path: list[str] = [])
| 1705 | visiting = set() |
| 1706 | |
| 1707 | def visit(image: Image, path: list[str] = []) -> None: |
| 1708 | if image.name in resolved: |
| 1709 | return |
| 1710 | if image.name in visiting: |
| 1711 | diagram = " -> ".join(path + [image.name]) |
| 1712 | raise ValueError(f"circular dependency in mzbuild: {diagram}") |
| 1713 | |
| 1714 | visiting.add(image.name) |
| 1715 | for d in sorted(image.depends_on): |
| 1716 | visit(self.images[d], path + [image.name]) |
| 1717 | resolved[image.name] = image |
| 1718 | |
| 1719 | for target_image in sorted(targets, key=lambda image: image.name): |
| 1720 | visit(target_image) |
nothing calls this directly
no test coverage detected