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

fix: improve error message for conflicting methods IDs #3491

Merged
merged 2 commits into from Jun 30, 2023

Conversation

trocher
Copy link
Contributor

@trocher trocher commented Jun 28, 2023

What I did

Fix again #3133 as it has been reverted by #2974.
Additionally, added a test for collisions of functions having 0x00000000 as ID.

How I did it

Similarly to #3134, modified validate_unique_method_ids so that it outputs both the signature of each function having a collision together with the collision id itself.

How to verify it

Trying to compile the following contract will now output the signature of the functions having a collision and the collision id:

@external
def OwnerTransferV7b711143(a : uint256) : 
    pass
@external
def withdraw(a : uint256):
    pass
  • Before: Methods have conflicting IDs:
  • Now: Methods produce colliding method ID '0x2e1a7d4d': OwnerTransferV7b711143(uint256), withdraw(uint256)

Commit message

fix: improve error message for conflicting methods IDs

Description for the changelog

Improve error message for conflicting methods IDs

Cute Animal Picture

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

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Merging #3491 (1755b7c) into master (c90ab2f) will increase coverage by 0.01%.
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    #3491      +/-   ##
==========================================
+ Coverage   89.35%   89.37%   +0.01%     
==========================================
  Files          84       84              
  Lines       10777    10778       +1     
  Branches     2456     2456              
==========================================
+ Hits         9630     9633       +3     
+ Misses        751      749       -2     
  Partials      396      396              
Impacted Files Coverage Δ
vyper/semantics/analysis/utils.py 91.84% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

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

@charles-cooper charles-cooper enabled auto-merge (squash) June 30, 2023 06:01
Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you!

@charles-cooper charles-cooper merged commit bc723d2 into vyperlang:master Jun 30, 2023
75 checks passed
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.

None yet

3 participants