I have noticed that nimble pulls the HEAD commit for a dependency instead of the latest tag.
I expect the latest tag to be pulled when no requirements are set on a version.
The faulty behaviour has been consistent in a GitHub CI. But inconsistent locally.
Yes, I was just able to reproduce locally so I can provide more info (after deleting ~/.nimble/pkgs2/* a few times).
The nimble file is as follow (truncated to what matters):
# Package
version = "0.1.0"
author = "fryorcraken"
description = "Test Waku with nimble"
license = "MIT"
srcDir = "src"
bin = @["example"]
# Dependencies
requires "chronos"
requires "results"
requires "waku"
I then install a specific waku commit:
nimble install waku@#375dc3deca2f3063d4bb74ad0d3f180bd9047b1b
CI
The symptom in the CI is as follows:
/home/runner/.nimble/pkgs2/websock-0.2.0-614476e24cad4fe27ee05d29c2b7ea3e4674e3c2/websock/frame.nim(12, 11) Error: cannot open file: pkg/stew/results
This is unexpected because while indeed stew/results was removed with a recent commit from nim-stew.
It is still present in the latest tag, here.
When running nimble --verbose install "waku@#375dc3deca2f3063d4bb74ad0d3f180bd9047b1b"
I can only see it saying it is pulling the latest tag for stew:
2025-09-16T07:23:32.4458222Z Downloading https://github.com/status-im/nim-stew using git
2025-09-16T07:23:32.6044154Z Cloning latest tagged version: v0.4.1
Yet, later it pulls from head:
2025-09-16T07:26:37.0673252Z Installing stew@0.4.1
2025-09-16T07:26:37.0675474Z Copying file /home/runner/.nimble/pkgcache/githubcom_statusimnimstew_#head/stew/closures.nim to /home/runner/.nimble/pkgs2/stew-0.4.1-503d2862a0e211bf0d4c99f5ac66932bf2712adc/stew/closures.nim
full raw logs here
And every Checking for stew line, show that there are no reason to pull HEAD:
▶ grep "Checking for stew" ci_nimble.txt|sed 's/^[^ ]\+ \+//'|sort|uniq
Checking for stew@>= 0.1.0
Checking for stew@>= 0.2.0
Checking for stew@>= 0.3.0
Checking for stew@>= 0.4.0
Checking for stew@any version
ci_nimble.txt
In the CI, I run nimble list --installed --ver and we can see both HEAD and 0.4.1 being installed. this is suspicious:
stew
└── @0.4.1 (503d2862a0e211bf0d4c99f5ac66932bf2712adc) [#head, 0.4.1] (/home/runner/.nimble/pkgs2/stew-0.4.1-503d2862a0e211bf0d4c99f5ac66932bf2712adc)
Feel free to ask for any command to be added to the CI, or even open a PR (code can be found at logos-messaging/logos-delivery#3564).
Locally
Locally the problem does not always appear. But I was able to reproduce this morning.
I ran the same command as the CI, just started with rm -rf ~/.nimble/pkgs2/*.
I can see that indeed, the HEAD commit of nim-stew master was pulled locally:
▶ head ~/.nimble/pkgs2/stew-0.4.1-503d2862a0e211bf0d4c99f5ac66932bf2712adc/nimblemeta.json
{
"version": 1,
"metaData": {
"url": "https://github.com/status-im/nim-stew",
"downloadMethod": "git",
"vcsRevision": "a57a03fe4323a5e9bf8a8dbf3fca32cfcaa818a8",
"files": [
"/stew/shims/strformat.nim",
"/stew/sorted_set/rbtree_walk.nim",
"/stew/base58.nim",
status-im/nim-stew@a57a03f is HEAD master.
▶ tail ~/.nimble/pkgs2/stew-0.4.1-503d2862a0e211bf0d4c99f5ac66932bf2712adc/nimblemeta.json
"/stew/sorted_set/rbtree_reset.nim",
"/stew/keyed_queue/kq_debug.nim"
],
"binaries": [],
"specialVersions": [
"#head",
"0.4.1"
]
}
}%
and I can see that indeed, both #head and 0.4.1 are listed.
On another occurrence, with the same nimble file, etc. vcsRevision was showing the correct commit for the latest tag (0.4.1).
When running nimble deps --tree I can confirm again, that no dependency is asking for stew@#head or a commit:
▶ nimble deps --tree | grep stew | sed 's/^[├─└│ ]\+//'|sort|uniq
stew >= 0.1.0 (@0.4.1)
stew >= 0.2.0 (@0.4.1)
stew >= 0.3.0 (@0.4.1)
stew >= 0.4.0 (@0.4.1)
stew @any (@0.4.1)
deps_tree.txt
Let me know if there are any other command you want me to run locally.
I have noticed that nimble pulls the HEAD commit for a dependency instead of the latest tag.
I expect the latest tag to be pulled when no requirements are set on a version.
The faulty behaviour has been consistent in a GitHub CI. But inconsistent locally.
Yes, I was just able to reproduce locally so I can provide more info (after deleting
~/.nimble/pkgs2/*a few times).The nimble file is as follow (truncated to what matters):
I then install a specific waku commit:
CI
The symptom in the CI is as follows:
This is unexpected because while indeed
stew/resultswas removed with a recent commit fromnim-stew.It is still present in the latest tag, here.
When running
nimble --verbose install "waku@#375dc3deca2f3063d4bb74ad0d3f180bd9047b1b"I can only see it saying it is pulling the latest tag for
stew:Yet, later it pulls from head:
full raw logs here
And every
Checking for stewline, show that there are no reason to pull HEAD:ci_nimble.txt
In the CI, I run
nimble list --installed --verand we can see both HEAD and 0.4.1 being installed. this is suspicious:Feel free to ask for any command to be added to the CI, or even open a PR (code can be found at logos-messaging/logos-delivery#3564).
Locally
Locally the problem does not always appear. But I was able to reproduce this morning.
I ran the same command as the CI, just started with
rm -rf ~/.nimble/pkgs2/*.I can see that indeed, the HEAD commit of nim-stew
masterwas pulled locally:status-im/nim-stew@a57a03f is HEAD
master.and I can see that indeed, both
#headand0.4.1are listed.On another occurrence, with the same nimble file, etc.
vcsRevisionwas showing the correct commit for the latest tag (0.4.1).When running
nimble deps --treeI can confirm again, that no dependency is asking forstew@#heador a commit:deps_tree.txt
Let me know if there are any other command you want me to run locally.