Skip to content
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

feat: relax restrictions on internal function signatures #3573

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Aug 28, 2023

InterfaceT.from_ast already checks unique method ids, so the validate_unique_method_ids call in the ModuleAnalyzer constructor is redundant. the check used to be there to avoid collisions between external method ids and internal "method ids" because the calling convention for internal functions used to involve the method id as part of the signature, but that is no longer the case. so we can safely allow collision between internal "method ids" and external method ids.

chainsec june 2023 review 5.22

cf. #1687, resolved in #1800

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

InterfaceT.from_ast already checks unique method ids, so the
`validate_unique_method_ids` call in the `ModuleAnalyzer` constructor is
redundant.

TODO: add an explicit test for collision with a generated getter

chainsec june 2023 review 5.22
@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2023

Codecov Report

Merging #3573 (b218e5f) into master (43c8d85) will decrease coverage by 0.07%.
Report is 8 commits behind head on master.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3573      +/-   ##
==========================================
- Coverage   89.13%   89.06%   -0.07%     
==========================================
  Files          85       85              
  Lines       11365    11367       +2     
  Branches     2585     2583       -2     
==========================================
- Hits        10130    10124       -6     
- Misses        813      821       +8     
  Partials      422      422              
Files Changed Coverage Δ
vyper/semantics/analysis/module.py 89.94% <100.00%> (-0.11%) ⬇️

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@charles-cooper charles-cooper changed the title chore: remove redundant unique method ids check feat: remove redundant unique method ids check Sep 1, 2023
@charles-cooper charles-cooper changed the title feat: remove redundant unique method ids check feat: relax restrictions on internal function signatures Sep 1, 2023
relax the restriction on unique "method ids" for internal methods. the
check used to be there to avoid collisions between external method ids
and internal "method ids" because the calling convention for internal
functions used to involve the method id as part of the signature, but
that is no longer the case. so we can safely allow collision between
internal "method ids" and external method ids.

cf. issue vyperlang#1687 which was resolved in in 9e8c661.

chainsec june 2023 review 5.22
@charles-cooper charles-cooper enabled auto-merge (squash) September 1, 2023 16:39
@charles-cooper charles-cooper merged commit a19cdea into vyperlang:master Sep 1, 2023
76 of 77 checks passed
@charles-cooper charles-cooper deleted the chore/remove-dead-method-id-validation branch September 1, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants