From df7a114d7ac3afa5ea7560617539dd9b8211f036 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 6 May 2026 08:41:59 +0200 Subject: [PATCH] IC: use the newer nif27 format (#25792) --- compiler/deps.nim | 11 ++++++++++- doc/ic.md | 2 +- koch.nim | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/compiler/deps.nim b/compiler/deps.nim index 116c0ebdf3..cfe0f0975f 100644 --- a/compiler/deps.nim +++ b/compiler/deps.nim @@ -488,10 +488,19 @@ proc generateBuildFile(c: DepContext): string = let exeFile = changeFileExt(c.nodes[0].files[0].nimFile, ExeExt) b.addTree "do" b.addIdent "nim_nifc" - # Input: .nim file (expanded as argument) and .nif file (dependency) + # Input: .nim file (expanded as argument) b.addTree "input" b.addStrLit mainNif b.endTree() + # Also depend on the semmed .nif files of the main module and all its + # dependencies. nifmake's topological sort orders nodes by depth; without + # these inputs the nim_nifc node sits at depth 1 (no recognized inputs) + # alongside the nifler nodes and runs *before* the nim_m steps that + # produce the .nif files it needs to read. + for node in c.nodes: + b.addTree "input" + b.addStrLit c.semmedFile(node.files[0]) + b.endTree() b.addTree "output" b.addStrLit exeFile b.endTree() diff --git a/doc/ic.md b/doc/ic.md index 9027f8ba63..9fd7b55d2b 100644 --- a/doc/ic.md +++ b/doc/ic.md @@ -33,7 +33,7 @@ The text representation is particularly valuable for debugging and introspection Each ``.nim`` module produces its own ``.nif`` file during compilation. The NIF format contains: -- **Header** - Version information (e.g., `(.nif26)`) +- **Header** - Version information (e.g., `(.nif27)`) - **Dependencies** - List of source files and dependencies - **Interface** - Exported symbols and their indices - **Body** - The intermediate representation of the module's code in Lisp-like syntax diff --git a/koch.nim b/koch.nim index c9269303b1..0ea083fb26 100644 --- a/koch.nim +++ b/koch.nim @@ -16,11 +16,11 @@ const ChecksumsStableCommit = "0b8e46379c5bc1bf73d8b3011908389c60fb9b98" # 2.0.1 SatStableCommit = "e63eaea8baf00bed8bcd5a29ffd8823abb265b39" - NimonyStableCommit = "c189ef438598878b2f02f6a2ff91d08febafc04b" # unversioned \ + NimonyStableCommit = "750aa47f2139fe5ad69f04b44428b752011fe873" # 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. - # Commit from 2026-04-27 + # Commit from 2026-05-05 # examples of possible values for fusion: #head, #ea82b54, 1.2.3 FusionStableHash = "#562467452b32cb7a97410ea177f083e6d8405734"