Open ritzdorf opened 2 months ago
There was the following problem with non-fixed pragmas (vyper_version = 0.4.0):
import boa boa.load("examples/simple.vy")
Leads to error:
vyper.exceptions.VersionException: Version specification "~=0.3.9" is not compatible with compiler version "0.4.0"
simple.vy:
# pragma version ^0.3.9 @external def foo() -> uint256: x: uint256 = 1 return x + 7
That happens because _detect_version returns None in this case, so VVM is not used, but compilation also fails.
_detect_version
So I changed _detect_version so that it:
See the new tests I added
Parse version pragma more precisely to use vvm if necessary
@charles-cooper I guess we will need a release. But first I found this issue: https://github.com/vyperlang/vvm/pull/24
What I did
There was the following problem with non-fixed pragmas (vyper_version = 0.4.0):
Leads to error:
simple.vy:
That happens because
_detect_version
returns None in this case, so VVM is not used, but compilation also fails.So I changed
_detect_version
so that it:How I did it
How to verify it
See the new tests I added
Description for the changelog
Parse version pragma more precisely to use vvm if necessary
Cute Animal Picture