vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.91k stars 804 forks source link

Version string inconsistent depending on installation method #4308

Closed DanielSchiavini closed 1 month ago

DanielSchiavini commented 1 month ago

Version Information

~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f
~ $ workon boa
(boa) ~/titanoboa $ vyper --version
0.4.0+commit.e9db8d9

What's your issue about?

there is a mismatch between pip-installed vyper and binary-installed vyper (e.g. via vvm).

How can it be fixed?

charles-cooper commented 1 month ago

this is the case for pipx vs github release-installed 0.3.10 as well:

~ $ vyper --version  # pipx install vyper==0.3.10
0.3.10+commit.9136169
~ $ .vvm/vyper-0.3.10  --version
0.3.10+commit.91361694
charles-cooper commented 1 month ago

the number of nibbles in the commit hash depends on the number of commits in the repository -- apparently this is different for the github release and pypi release workflows

https://github.com/vyperlang/vyper/blob/8f9a8cac49aafb3fbc9dde78f0f6125c390c32f0/.github/workflows/build.yml#L56-L61

https://github.com/vyperlang/vyper/blob/8f9a8cac49aafb3fbc9dde78f0f6125c390c32f0/.github/workflows/release-pypi.yml#L22-L23