Skip to content

fix[lang]: allow print() schema larger than 32 bytes#4456

Merged
charles-cooper merged 6 commits intovyperlang:masterfrom
charles-cooper:fix/print-schema
Feb 19, 2025
Merged

fix[lang]: allow print() schema larger than 32 bytes#4456
charles-cooper merged 6 commits intovyperlang:masterfrom
charles-cooper:fix/print-schema

Conversation

@charles-cooper
Copy link
Copy Markdown
Member

@charles-cooper charles-cooper commented Jan 20, 2025

What I did

How I did it

How to verify it

Commit message

historically, the schema generated internally by the `print()` builtin
was not allowed to be larger than 32 bytes, ostensibly to simplify the
code for generating the IR, leading to a panic if the user tried to
print a sufficiently complex type (i.e. with an ABI type larger than
32 bytes).

this commit replaces the code for generating the schema in IR with
`Expr._make_bytelike` (along with a small refactor for `_make_bytelike`
to make it a classmethod instead of an instance method), generalizing
to schemas of any size.

Description for the changelog

Cute Animal Picture

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

historically, schemas larger than 32 bytes were blocked, presumably as a
sanity check. however, it is not really needed.
@charles-cooper charles-cooper added this to the v0.4.1 milestone Jan 20, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.12%. Comparing base (8da4e6f) to head (5a147ef).
Report is 93 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4456      +/-   ##
==========================================
+ Coverage   92.11%   92.12%   +0.01%     
==========================================
  Files         119      119              
  Lines       16965    16962       -3     
  Branches     2873     2872       -1     
==========================================
- Hits        15627    15626       -1     
+ Misses        920      919       -1     
+ Partials      418      417       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-cooper charles-cooper added the release - must release blocker label Feb 18, 2025
@charles-cooper charles-cooper marked this pull request as ready for review February 18, 2025 15:15
@charles-cooper charles-cooper enabled auto-merge (squash) February 19, 2025 11:06
@charles-cooper charles-cooper changed the title fix[lang]: allow print schema larger than 32 bytes fix[lang]: allow print() schema larger than 32 bytes Feb 19, 2025
@charles-cooper charles-cooper enabled auto-merge (squash) February 19, 2025 11:07
@charles-cooper charles-cooper enabled auto-merge (squash) February 19, 2025 11:11
@charles-cooper charles-cooper merged commit 9e396fb into vyperlang:master Feb 19, 2025
159 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release - must release blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants