Repository navigation
Conversation
Member
No, it's the future! :D |
nitely
force-pushed
the
ns_nif_spawn
branch
2 times, most recently
from
October 28, 2026 05:51
06519a9 to
d6ed144
Compare
This was referenced Nov 9, 2026
Araq
pushed a commit
that referenced
this pull request
Nov 11, 2026
`materializeReexportedModule` created a new module symbol every time an interface referenced a re-exported module (import x; export x). Projects that re-export heavily, like nimbus, end up with thousands of copies per module. This caches them by module and name. `icQualIfaces` is replaced by a private `icQualModules`. nimbus-eth2 beacon_chain/nimbus_beacon_node.nim, cold nim ic --parallelBuild:3: | Metric | devel | This PR | |:--|--:|--:| | Wall time | 20:16 | 16:02 | | Peak RSS | 6.5 GB | 1.6 GB | | `.s.bif` size | 919 MB | 619 MB | | All NIFs | 2,123 MB | 1,522 MB | Split from #26494
Araq
pushed a commit
to nim-lang/nimony
that referenced
this pull request
Nov 11, 2026
Add `-k` / `--keepgoing` to `nifmake run`. When a command fails, nifmake keeps building everything that doesn't depend on it, instead of stopping at the first failure. The commands that depend on the failed one are skipped, and the run still exits non-zero. Without the flag, behavior is unchanged. `failed` now also flushes stdout; the `nifmake: command failed` line would otherwise stay buffered while later jobs write their output. `tests/nifmake/setup.nim` adds a `keepgoing` scenario and an `after` job that depends only on the job still running when the other one fails: - with `--keepgoing`, `after` runs (`total=3`) and the failed job's dependent doesn't; - without it, `after` isn't launched (`total=2`), which also covers the existing stop-after-failure behavior. Needed by [nimsuggest2](nim-lang/Nim#26494) so an unknown file/root that fails to compile does not break the rest of roots.
Member
|
@nitely can we base/merge this with |
Araq
pushed a commit
that referenced
this pull request
Nov 12, 2026
Saving a nim.cfg without changing it made every later nim ic and nim track run start the nim icconfig producer again, until the content changed. The precompiled config is written only when its content changes, so its mtime stayed older than the saved source, and sourcesChanged compared against that mtime. The driver now sets the config's mtime to when the producer started, after every producer run. That also catches a config source saved while the producer was running. Split from #26494
Contributor
Author
|
@Araq maybe it would make sense for |
Member
Works for me too. |
handle git checkouts
nim ic behavior
Treat a NIF as stale when an import's interface or used bodies changed after it was written, skipping imports in the same cycle.
requires nifmake -k option
- works the same as before for single project file - extra projects are loaded with their config instead of the main project config; if they have one - unknown files are resolved to the right project - fix find all usages and rename
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #26439 (comment)
Adds
nimsuggest2: a thin, long-lived proxy compatible with nimsuggest's socket protocol (v4). Each query runsnimsuggest2 --one-shotin a fresh process. That process loads the project's modules from the IC NIFs built by the newnim nscommand, and compiles the queried file as a regular module (not as main module).changedrerunsnim ns, which only rebuilds what changed.Most of the code is in nsoneshot.nim which is a "cleaned up" copy of nimsuggest.nim
Compared to nimsuggest
highlight/def/use/dusare answered from the NIFs without compiling. Fallback to compiling unsaved file (~2x-8x slower IIRC).--maxMemory, no exception inlay hints, no outline.Compared to
nim tracksug,con,chk,chkFile,highlight,outline2,type,declaration,expand,inlayHints,globalSymbols, …), on unsaved buffers too, with full symbols, so hover works.nim nsisnim track's build step plus a report of which modules it checked.Performance is sub-second for every query on langserver repository.
this is just a PoC.