From b3d4c30fe25d7a3a64f414d8a13024c87643e74c Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sat, 4 Apr 2026 16:51:08 +0200 Subject: [PATCH] avoid add nim and nimble in nimble.lock --- Makefile | 4 ++-- nimble.lock | 20 -------------------- waku.nimble | 10 +++++----- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index e22bdd097..17661d6ac 100644 --- a/Makefile +++ b/Makefile @@ -92,8 +92,8 @@ clean: rm nimble.paths 2> /dev/null || true nimble clean -REQUIRED_NIM_VERSION := $(shell grep -E '^requires "nim ==' waku.nimble | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') -REQUIRED_NIMBLE_VERSION := $(shell grep -E '^requires "nimble ==' waku.nimble | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') +REQUIRED_NIM_VERSION := $(shell grep -E '^const NimVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') +REQUIRED_NIMBLE_VERSION := $(shell grep -E '^const NimbleVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') build: @nim_ver=$$(nim --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ diff --git a/nimble.lock b/nimble.lock index 2d9968733..6460cef3e 100644 --- a/nimble.lock +++ b/nimble.lock @@ -471,26 +471,6 @@ "sha1": "fa2a7552c6ec860717b77ce34cf0b7afe4570234" } }, - "nim": { - "version": "2.2.8", - "vcsRevision": "", - "url": "https://github.com/nim-lang/Nim.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "dbea2685008ca7504c044fdbcf68abf4bf9931b2" - } - }, - "nimble": { - "version": "0.18.2", - "vcsRevision": "b1dc28450f028aead0b7cf5da8adf2267db65f89", - "url": "https://github.com/nim-lang/nimble", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "92677df41381f27d0d582a7353ada21b3387b4c4" - } - }, "presto": { "version": "0.1.1", "vcsRevision": "d66043dd7ede146442e6c39720c76a20bde5225f", diff --git a/waku.nimble b/waku.nimble index 9c06e9536..2986c07b4 100644 --- a/waku.nimble +++ b/waku.nimble @@ -10,11 +10,11 @@ description = "Waku, Private P2P Messaging for Resource-Restricted Devices" license = "MIT or Apache License 2.0" #bin = @["build/waku"] -## We want to use the 2.2.4 nim version as it was the one we used in nimbus-build-system -## The reason why we enforce an old nimble version is because is the one that gets -## installed when doing `choosenim 2.2.4`. -requires "nim == 2.2.4" -requires "nimble == 0.18.2" +## Required toolchain versions — defined as constants so they are enforced at +## build time (via the Makefile) without being added to nimble.lock, which would +## embed platform-specific checksums and cause cross-platform mismatch errors. +const NimVersion = "2.2.4" +const NimbleVersion = "0.18.2" ### Dependencies requires "chronos >= 4.2.0",