enhance README and Makefile#3861
Conversation
Co-authored-by: Copilot <copilot@github.com>
|
You can find the image built from this PR at Built from 20b5d50 |
| Supported toolchain versions: | ||
| - Nim 2.2.4 | ||
| - Nimble 0.22.3 | ||
|
|
||
| These versions are enforced by the repository configuration and the Makefile. |
There was a problem hiding this comment.
I see a conflict between "supported" and "enforced by the repository"
| The easiest way to install these, is using `rustup`: | ||
|
|
||
| Supported toolchain versions: | ||
| - Nim 2.2.4 |
There was a problem hiding this comment.
Isn't Nim installed by Nimble? So only Nimble is required, no?
There was a problem hiding this comment.
Yes but afaik, a nimble version implies a certain Nim version. Then, if we want to use nimble 0.22.3, that would install nim 2.2.8 but we don't want/need to bump the compiler yet.
There was a problem hiding this comment.
But don't we specify Nim version in the nimble file?
There was a problem hiding this comment.
In the nimble file we specify a minimum supported version. We suggest the use of 2.2.4 Nim compiler but it may also compile with larger versions.
The README.md now suggests:
Recommended and tested toolchain versions:
...
The script looks correct now. Here's the summary of what changed and why:
scripts/install_nim.sh — two changes:
Moved NIM_DEST definition to the top (line 20), before the early-exit check that references it.
Replaced the early-exit condition. The old logic checked nim --version in PATH and exited if it matched — including a silent exit for "newer version already installed". The problem: on the Linux machine, nim 2.2.4 was installed by the system package manager at a non-standard path (e.g. /usr/bin/nim or /nix/store/…). The script saw the right version and exited early, but ~/.nim/nim-2.2.4/ was never created. Later, when nimble fell back to downloading nimble 0.22.3 source and compiling it, nim looked for its stdlib at ~/.nim/nim-2.2.4/lib/system.nim — which didn't exist.
The new logic: only skip if ${NIM_DEST}/lib/system.nim actually exists (i.e. we installed it there). If it does, re-create the ~/.nimble/bin/ symlinks just in case they're stale, then exit. Otherwise, always download and install to ~/.nim/nim-2.2.4/, creating a self-contained installation the rest of the build can rely on.
|
From discussions on discord https://discord.com/channels/973324189794697286/1504518624818368512: Running We need to verify whether the actions performed by |
|
@Ivansete-status please also have a look at my changes, I can't add you as a reviewer because this PR is assigned to you |
No description provided.