Skip to content

Commit

Permalink
Update vvm
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Sep 23, 2024
1 parent 99cb8e1 commit 8b778dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
14 changes: 5 additions & 9 deletions boa/interpret.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import vvm
import vyper
from vvm.exceptions import UnexpectedVersionError
from packaging.version import Version
from vyper.cli.vyper_compile import get_search_paths
from vyper.compiler.input_bundle import (
ABIInput,
Expand Down Expand Up @@ -214,14 +214,10 @@ def loads_partial(
if dedent:
source_code = textwrap.dedent(source_code)

try:
version = vvm.detect_vyper_version_from_source(source_code)
if str(version) != vyper.__version__:
# TODO: pass name to loads_partial_vvm, not filename
return _loads_partial_vvm(source_code, version, filename)
except UnexpectedVersionError as e:
if e.args[0] != "No version detected in source code":
raise
version = vvm.detect_vyper_version_from_source(source_code)
if version is not None and version != Version(vyper.__version__):
# TODO: pass name to loads_partial_vvm, not filename
return _loads_partial_vvm(source_code, str(version), filename)

compiler_args = compiler_args or {}

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ dependencies = [
"pytest-cov",

# required to compile older versions of vyper
# "vvm>=0.3.1,<0.4.0",
"vvm @ git+https://github.com/DanielSchiavini/vvm.git@dependencies",
"vvm>=0.3.1,<0.4.0",

# eth-rlp requirement, not installed by default with 3.12
"typing-extensions",
Expand Down

0 comments on commit 8b778dd

Please sign in to comment.