Skip to content

Commit

Permalink
modulegraphs.dependsOn does not work on transitive modules
Browse files Browse the repository at this point in the history
- make sure transitive deps are marked as dirty
  • Loading branch information
yyoncho committed Jun 14, 2022
1 parent 9c1a369 commit 5fa7e3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/modulegraphs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,12 @@ proc markClientsDirty*(g: ModuleGraph; fileIdx: FileIndex) =
# every module that *depends* on this file is also dirty:
for i in 0i32..<g.ifaces.len.int32:
if g.deps.contains(i.dependsOn(fileIdx.int)):
g.markDirty(FileIndex(i))
let
fi = FileIndex(i)
module = g.getModule(fi)
if module != nil and not g.isDirty(module):
g.markDirty(fi)
g.markClientsDirty(fi)

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

0 comments on commit 5fa7e3b

Please sign in to comment.