make nimsuggest compile again

This commit is contained in:
Araq
2025-11-11 11:46:14 +01:00
parent 820a51ee6d
commit d7543ed125
3 changed files with 5 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ proc compileModule*(graph: ModuleGraph; fileIdx: FileIndex; flags: TSymFlags, fr
let filename = AbsoluteFile toFullPath(graph.config, fileIdx)
if result == nil:
result = newModule(graph, fileIdx)
result.flags.incl flags
result.incl flags
registerModule(graph, result)
processModuleAux("import")
else:
@@ -185,7 +185,7 @@ proc compileModule*(graph: ModuleGraph; fileIdx: FileIndex; flags: TSymFlags, fr
replayStateChanges(graph.packed.pm[m.int].module, graph)
replayGenericCacheInformation(graph, m.int)
elif graph.isDirty(result):
result.flags.excl sfDirty
result.excl sfDirty
# reset module fields:
initStrTables(graph, result)
result.ast = nil

View File

@@ -590,7 +590,7 @@ when defined(nimsuggest):
let infoAsInt = info.infoToInt
for infoB in s.allUsages:
if infoB.infoToInt == infoAsInt: return
s.allUsages.add(info)
s.allUsagesImpl.add(info)
proc findUsages(g: ModuleGraph; info: TLineInfo; s: PSym; usageSym: var PSym) =
if g.config.suggestVersion == 1:

View File

@@ -1151,9 +1151,9 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile,
# ideSug/ideCon performs partial build of the file, thus mark it dirty for the
# future calls.
graph.markDirtyIfNeeded(file.string, fileIndex)
graph.recompilePartially(fileIndex)
graph.recompilePartially(fileIndex)
let m = graph.getModule fileIndex
incl m.flags, sfDirty
incl m, sfDirty
of ideOutline:
let n = parseFile(fileIndex, graph.cache, graph.config)
graph.iterateOutlineNodes(n, graph.fileSymbols(fileIndex).deduplicateSymInfoPair(false))