nimble
nimble copied to clipboard
version in nimble file redundant with git tag of package?
what's the utility of the version field in a nimble file?
I feel this is redundant with a package git tag and can only cause confusion; an un-tagged package shouldn't be treated as such because the whole point of a tag is to be associated with a fixed commit
eg:
NIMBLE_DIR=$HOME/.nimble_fake78g XDG_CONFIG_HOME= nimble install https://github.com/disruptek/[email protected]
Installing https://github.com/juancarlospaco/nim-bytes2human@any version
Downloading https://github.com/juancarlospaco/nim-bytes2human using git
Verifying dependencies for [email protected]
Installing [email protected]
=> installs $HOME/.nimble_fake78g/pkgs/bytes2human-0.2.2/
in nim-bytes2human:
grep version bytes2human.nimble
version = "0.2.2"
git rev-parse HEAD
ec2c1a758cabdd4751a06c8ebf2b923f19e32731
git fetch --tags
git tag # empty
The utility is that it enables a standalone Nimble package to be installed, i.e. one without git metadata.
We can make it optional though.
We can make it optional though.
yes! that's a clear violation of DRY otherwise (remembering to git tag on version bump in the nimble file), and leads to problems where there's a version and no git tag, or where a version in nimble doesn't translate 1:1 to a commit