Skip to content

Commit 1da3976

Browse files
authored
fixes #1176; when remove build artifacts, remove cached timestamp (#1183)
Timestamps of output files are cached before they are updated. Even after output files are updated, nodes that uses them as input uses cached old timestamp in `needsRebuild`.
1 parent 3eeae01 commit 1da3976

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nifmake/nifmake.nim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ proc getFileTime(dag: var Dag; filename: string): Time =
213213
proc removeOutdatedArtifacts(dag: var Dag; node: Node; opt: set[CliOption]) =
214214
## Remove outdated build artifacts for a node
215215
for output in node.outputs:
216+
# Remove its cached timestamp as it is no longer valid
217+
dag.timestampCache.del output
216218
if fileExists(output):
217219
try:
218220
removeFile(output)

0 commit comments

Comments
 (0)