-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: forge
Vyper incompatibility with PEP 440
#9123
bug: forge
Vyper incompatibility with PEP 440
#9123
Comments
Ok I have investigated the issue. It's a vyper.exceptions.VersionException: Version specification "~=0.4.1" is not compatible with compiler version "0.4.1b1"
line 1:0
---> 1 # pragma version ~=0.4.1
-------^
2 """ It would have been super helpful if |
Triaged this w/ @pcaversaccio over Telegram, appears to be unrelated to Foundry but rather related to new On the initial build w/ my existing Vyper installation of 0.4.0 it did raise so it might be related to the pragma not being recognized and therefore throwing a catch-all error.
To reproduce:
|
hmm actually it still fails if the git grep -l '=0.4.1' | xargs sed -i 's/=0.4.1/=0.4.1b1/g'
After run again: forge build |
Was able to track it down to a |
Turns out it |
Found Vyper sources, but no compiler versions are available for it
Found Vyper sources, but no compiler versions are available for it
incompatibility with 0.4.1b1
Correct. The relevant PR is this one. For the pre-releases, you can find the versioning specification here: X.YaN # Alpha release
X.YbN # Beta release
X.YrcN # Release Candidate
X.Y # Final release Also, note that I use PEP 440 compatible version specifier |
Found Vyper sources, but no compiler versions are available for it
incompatibility with 0.4.1b1
forge
Vyper incompatibility with PEP 440
cc @klkvr |
Closes foundry-rs/foundry#9123 I've done similar workaround for rc before. For semver we need those to be prepended by a dash. PEP440 pragmas are still might not be parsed correctly but this is not a showstopper as we're just ignoring them right now, and user would see a vyper error in case of mismatch.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (cc8e430 2024-10-16T00:22:08.572482504Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Foundry Vyper is not compatible with PEP 440 version specifiers.
[OUTDATED]
All of my snekmate pipelines are currently broken (see, e.g. here), due to the latest Vyper commit here: vyperlang/vyper@039d369.
forge
will throw with:But if you install one commit before:
pip install git+https://github.com/vyperlang/vyper@8f9a8cac49aafb3fbc9dde78f0f6125c390c32f0
it will succeed. I haven't debugged it yet fully but it's probably related to the commit hash.
The text was updated successfully, but these errors were encountered: