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: dense selector table when there are empty buckets #3606

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Sep 15, 2023

What I did

per title, h/t to @trocher for discovering

How I did it

prune solutions which result in empty buckets

How to verify it

see tests

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-->

charles-cooper and others added 2 commits September 15, 2023 18:06
certain combinations of selectors can result in some buckets being
empty. in this case, the header section is incomplete. this commit fixes
the issue by bailing out of the mkbucket routine when there are empty
buckets (thus treating the configurations with empty buckets as invalid)
---------

Co-authored-by: Tanguy Rocher <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2023

Codecov Report

Merging #3606 (93a3ae5) into master (3b310d5) will decrease coverage by 0.09%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master    #3606      +/-   ##
==========================================
- Coverage   89.09%   89.01%   -0.09%     
==========================================
  Files          85       86       +1     
  Lines       11392    11407      +15     
  Branches     2591     2595       +4     
==========================================
+ Hits        10150    10154       +4     
- Misses        820      831      +11     
  Partials      422      422              
Files Changed Coverage Δ
vyper/codegen/jumptable_utils.py 73.33% <100.00%> (+1.90%) ⬆️
vyper/codegen/module.py 98.81% <100.00%> (+<0.01%) ⬆️

... and 6 files with indirect coverage changes

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

tests/parser/test_selector_table.py Show resolved Hide resolved
vyper/codegen/jumptable_utils.py Outdated Show resolved Hide resolved
@charles-cooper charles-cooper merged commit 823675a into vyperlang:master Sep 18, 2023
81 of 82 checks passed
@charles-cooper charles-cooper deleted the fix/dense-jumptable-empty-buckets branch September 18, 2023 15:16
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.

4 participants