mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
fixes #23283
This commit is contained in:
@@ -839,7 +839,7 @@ proc findSymDataInRange(graph: ModuleGraph, file: AbsoluteFile; startLine, start
|
||||
|
||||
proc markDirtyIfNeeded(graph: ModuleGraph, file: string, originalFileIdx: FileIndex) =
|
||||
let sha = $sha1.secureHashFile(file)
|
||||
if graph.config.m.fileInfos[originalFileIdx.int32].hash != sha or graph.config.ideCmd == ideSug:
|
||||
if graph.config.m.fileInfos[originalFileIdx.int32].hash != sha or graph.config.ideCmd in {ideSug, ideCon}:
|
||||
myLog fmt "{file} changed compared to last compilation"
|
||||
graph.markDirty originalFileIdx
|
||||
graph.markClientsDirty originalFileIdx
|
||||
@@ -1000,7 +1000,6 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile,
|
||||
conf.m.trackPosAttached = false
|
||||
else:
|
||||
conf.m.trackPos = default(TLineInfo)
|
||||
if cmd != ideCon: #ideCon is recompiled below
|
||||
graph.recompilePartially(fileIndex)
|
||||
|
||||
case cmd
|
||||
@@ -1037,14 +1036,13 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile,
|
||||
graph.recompileFullProject()
|
||||
of ideChanged:
|
||||
graph.markDirtyIfNeeded(file.string, fileIndex)
|
||||
of ideSug:
|
||||
# ideSug performs partial build of the file, thus mark it dirty for the
|
||||
of ideSug, ideCon:
|
||||
# ideSug/ideCon performs partial build of the file, thus mark it dirty for the
|
||||
# future calls.
|
||||
graph.markDirtyIfNeeded(file.string, fileIndex)
|
||||
of ideCon:
|
||||
graph.markDirty fileIndex
|
||||
graph.markClientsDirty fileIndex
|
||||
graph.recompilePartially(fileIndex)
|
||||
graph.recompilePartially(fileIndex)
|
||||
let m = graph.getModule fileIndex
|
||||
incl m.flags, sfDirty
|
||||
of ideOutline:
|
||||
let n = parseFile(fileIndex, graph.cache, graph.config)
|
||||
graph.iterateOutlineNodes(n, graph.fileSymbols(fileIndex).deduplicateSymInfoPair)
|
||||
|
||||
Reference in New Issue
Block a user