Skip to content

Commit b84b965

Browse files
committed
Make sure transitive deps are marked as dirty
1 parent 57300cf commit b84b965

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compiler/modulegraphs.nim

+6-2
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,12 @@ proc markClientsDirty*(g: ModuleGraph; fileIdx: FileIndex) =
591591
# every module that *depends* on this file is also dirty:
592592
for i in 0i32..<g.ifaces.len.int32:
593593
if g.deps.contains(i.dependsOn(fileIdx.int)):
594-
g.markDirty(FileIndex(i))
595-
g.markClientsDirty(FileIndex(i))
594+
let
595+
fi = FileIndex(i)
596+
module = g.getModule(fi)
597+
if module != nil and not g.isDirty(module):
598+
g.markDirty(fi)
599+
g.markClientsDirty(fi)
596600

597601
proc needsCompilation*(g: ModuleGraph): bool =
598602
# every module that *depends* on this file is also dirty:

0 commit comments

Comments
 (0)