Skip to content

Commit 2816aeb

Browse files
committed
Fixed sanity check for compile order if just a single file is used.
1 parent b76b71b commit 2816aeb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyVHDLModel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ def predicate(edge: Edge) -> bool:
11631163
e["kind"] = DependencyGraphEdgeKind.CompileOrder
11641164

11651165
def IterateDocumentsInCompileOrder(self) -> Generator['Document', None, None]:
1166-
if self._compileOrderGraph.EdgeCount == 0:
1166+
if self._compileOrderGraph.EdgeCount < self._compileOrderGraph.VertexCount - 1:
11671167
raise VHDLModelException(f"Compile order is not yet computed from dependency graph.")
11681168

11691169
for compileOrderNode in self._compileOrderGraph.IterateTopologically():

tests/unit/Analyze.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
class VHDLLibrary(TestCase):
5252
def CreateDesign(self) -> Design:
53-
design = Design()
53+
design = Design("example")
5454
library = design.GetLibrary("lib_1")
5555

5656
path = Path("tests.vhdl")

0 commit comments

Comments
 (0)