Skip to content

Commit

Permalink
add back in deepcopy of vyper_module
Browse files Browse the repository at this point in the history
so that you can always recover the unannotated AST even if later phases
get run.
  • Loading branch information
charles-cooper committed Dec 31, 2023
1 parent 2f00b29 commit 58f25b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vyper/compiler/phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from functools import cached_property
from pathlib import Path, PurePath
from typing import Optional
import copy

from vyper import ast as vy_ast
from vyper.codegen import module
Expand Down Expand Up @@ -259,6 +260,7 @@ def generate_annotated_ast(
StorageLayout
Layout of variables in storage
"""
vyper_module = copy.deepcopy(vyper_module)
with input_bundle.search_path(Path(vyper_module.resolved_path).parent):
# note: validate_semantics does type inference on the AST
validate_semantics(vyper_module, input_bundle)
Expand Down

0 comments on commit 58f25b6

Please sign in to comment.