From d3be5e5e135401e9a403d9b95e76c888d492c724 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 6 Jan 2026 00:16:19 +0100 Subject: [PATCH] IC: need a more recent Nimony for its improved Nifler tool (#25412) --- compiler/commands.nim | 3 ++- compiler/ic/navigator.nim | 2 +- compiler/options.nim | 1 + koch.nim | 7 +++++-- testament/categories.nim | 6 +++--- tests/ic/tgenericinst.nim | 4 ++-- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/compiler/commands.nim b/compiler/commands.nim index 622e5536fe..869fc682a7 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -1000,7 +1000,8 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; # xxx maybe also ic, since not in help? if pass in {passCmd2, passPP}: case arg.normalize - of "on": conf.symbolFiles = v2Sf + of "on": conf.ic = true + of "legacy": conf.symbolFiles = v2Sf of "off": conf.symbolFiles = disabledSf of "writeonly": conf.symbolFiles = writeOnlySf of "readonly": conf.symbolFiles = readOnlySf diff --git a/compiler/ic/navigator.nim b/compiler/ic/navigator.nim index 39037b94f2..9d58aa3840 100644 --- a/compiler/ic/navigator.nim +++ b/compiler/ic/navigator.nim @@ -7,7 +7,7 @@ # distribution, for details about the copyright. # -## Supports the "nim check --ic:on --defusages:FILE,LINE,COL" +## Supports the "nim check --ic:legacy --defusages:FILE,LINE,COL" ## IDE-like features. It uses the set of .rod files to accomplish ## its task. The set must cover a complete Nim project. diff --git a/compiler/options.nim b/compiler/options.nim index a1c373828b..28e7014497 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -369,6 +369,7 @@ type numberOfProcessors*: int # number of processors lastCmdTime*: float # when caas is enabled, we measure each command symbolFiles*: SymbolFilesOption + ic*: bool # whether ic is enabled spellSuggestMax*: int # max number of spelling suggestions for typos cppDefines*: HashSet[string] # (*) diff --git a/koch.nim b/koch.nim index 58df9fadb7..0a7cd2ece4 100644 --- a/koch.nim +++ b/koch.nim @@ -16,7 +16,7 @@ const ChecksumsStableCommit = "0b8e46379c5bc1bf73d8b3011908389c60fb9b98" # 2.0.1 SatStableCommit = "faf1617f44d7632ee9601ebc13887644925dcc01" - NimonyStableCommit = "322178d9af6676363d5237382c6d6c1b4e56d3cd" # unversioned \ + NimonyStableCommit = "e2cd6eadcaa68eb8ab380cb4d3bdd7fd260677b4" # unversioned \ # Note that Nimony uses Nim as a git submodule but we don't want to install # Nimony's dependency to Nim as we are Nim. So a `git clone` without --recursive # is **required** here. @@ -188,6 +188,9 @@ proc bundleChecksums(latest: bool) = let nimonyCommit = if latest: "HEAD" else: NimonyStableCommit cloneDependency(distDir, "https://github.com/nim-lang/nimony.git", nimonyCommit, allowBundled = true) + nimCompileFold("Compile nifler", "dist/nimony/src/nifler/nifler.nim", options = "-d:release") + nimCompileFold("Compile nifmake", "dist/nimony/src/nifmake/nifmake.nim", options = "-d:release") + proc bundleNimsuggest(args: string) = bundleChecksums(false) nimCompileFold("Compile nimsuggest", "nimsuggest/nimsuggest.nim", @@ -553,7 +556,7 @@ proc icTest(args: string) = for fragment in content.split("#!EDIT!#"): let file = inp.replace(".nim", "_temp.nim") writeFile(file, fragment) - var cmd = nimExe & " cpp --ic:on -d:nimIcIntegrityChecks --listcmd " + var cmd = nimExe & " cpp --ic:legacy -d:nimIcIntegrityChecks --listcmd " if i == 0: cmd.add "-f " cmd.add quoteShell(file) diff --git a/testament/categories.nim b/testament/categories.nim index eba1e3cb27..b16ddbb91d 100644 --- a/testament/categories.nim +++ b/testament/categories.nim @@ -493,8 +493,8 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string; tooltests = ["compiler/nim.nim"] writeOnly = " --incremental:writeonly " readOnly = " --incremental:readonly " - incrementalOn = " --incremental:on -d:nimIcIntegrityChecks " - navTestConfig = " --ic:on -d:nimIcNavigatorTests --hint:Conf:off --warnings:off " + incrementalOn = " --incremental:legacy -d:nimIcIntegrityChecks " + navTestConfig = " --ic:legacy -d:nimIcNavigatorTests --hint:Conf:off --warnings:off " template test(x: untyped) = testSpecWithNimcache(r, makeRawTest(file, x & options, cat), nimcache) @@ -508,7 +508,7 @@ proc icTests(r: var TResults; testsDir: string, cat: Category, options: string; template checkTest() = var test = makeRawTest(file, options, cat) - test.spec.cmd = compilerPrefix & " check --hint:Conf:off --warnings:off --ic:on $options " & file + test.spec.cmd = compilerPrefix & " check --hint:Conf:off --warnings:off --ic:legacy $options " & file testSpecWithNimcache(r, test, nimcache) if not isNavigatorTest: diff --git a/tests/ic/tgenericinst.nim b/tests/ic/tgenericinst.nim index 3346764f54..dea55235b1 100644 --- a/tests/ic/tgenericinst.nim +++ b/tests/ic/tgenericinst.nim @@ -1,5 +1,5 @@ discard """ - cmd: "nim cpp --incremental:on $file" + cmd: "nim cpp --incremental:legacy $file" """ {.emit:"""/*TYPESECTION*/ @@ -8,4 +8,4 @@ discard """ """.} type Foo {.importcpp.} = object -echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo \ No newline at end of file +echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo