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

Forward attributes on function parameters to generated prop struct in inline_props #753

Merged

Conversation

lukechu10
Copy link
Member

Fixes a regression from 0.9.0-beta.4 where function arguments no longer forward their attributes to the generated prop struct when using inline_props.

For example, this should forward the attributes onto the corresponding field in the props struct.

#[component(inline_props)]
fn Foo(
    /// Test
    #[prop(default)]
    value: i32,
) -> View { ... }

@lukechu10 lukechu10 added C-bug Category: bug, something isn't working A-macro Area: macros labels Nov 3, 2024
Copy link

codecov bot commented Nov 3, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.35%. Comparing base (47ca5f1) to head (18a5477).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/sycamore-macro/src/component.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #753      +/-   ##
==========================================
+ Coverage   72.33%   72.35%   +0.01%     
==========================================
  Files          45       45              
  Lines        6553     6557       +4     
==========================================
+ Hits         4740     4744       +4     
  Misses       1813     1813              

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

@lukechu10 lukechu10 merged commit ebb99b3 into sycamore-rs:main Nov 3, 2024
11 checks passed
@lukechu10 lukechu10 deleted the fix-attributes-on-inline-props branch November 3, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macro Area: macros C-bug Category: bug, something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant