-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
refactor[codegen]: make settings into a global object #3929
refactor[codegen]: make settings into a global object #3929
Conversation
this unifies various functions which modify global settings: anchor_opt_level, anchor_evm_version, _set_debug
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3929 +/- ##
==========================================
- Coverage 90.96% 90.75% -0.21%
==========================================
Files 95 95
Lines 14397 14393 -4
Branches 3191 3190 -1
==========================================
- Hits 13096 13063 -33
- Misses 901 924 +23
- Partials 400 406 +6 ☔ View full report in Codecov by Sentry. |
vyper/evm/opcodes.py
Outdated
@@ -208,16 +207,9 @@ | |||
IR_OPCODES: OpcodeMap = {**OPCODES, **PSEUDO_OPCODES} | |||
|
|||
|
|||
@contextlib.contextmanager | |||
def anchor_evm_version(evm_version: Optional[str] = None) -> Generator: | |||
def set_global_evm_version(evm_version: int) -> None: | |||
global active_evm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be combined into the global settings singleton?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the change is a bit more extensive, but let me try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one suggestion
this commit adds a global settings object, unifying various functions which modify global settings: anchor_opt_level, anchor_evm_version, _set_debug
What I did
How I did it
cherry-picked relevant commits from #3905
How to verify it
Commit message
Description for the changelog
Cute Animal Picture