-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 #2553 - automatically convert closure to callback for component properties #2554
Fix #2553 - automatically convert closure to callback for component properties #2554
Conversation
Visit the preview URL for this PR (updated for commit cc84ab7): https://yew-rs-api--pr2554-2553-support-closure-vz042zvr.web.app (expires Sun, 03 Apr 2022 18:51:34 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Size Comparison
|
Thanks, also for adding test cases. The build failure is probably due to mismatching error reporting from macro outputs, where an additional "the following implementations were found" line is shown. You can check this by heeding the advice from the failing build:
on your local machine, and see what changes would be committed to the respective, expected |
$ TRYBUILD=overwrite cargo make tests
$ TRYBUILD=overwrite cargo test --all-targets --workspace --exclude website-test
$ TRYBUILD=overwrite cargo make pr-flow
$ rustup override set 1.56 && TRYBUILD=overwrite cargo make tests
Edit: I looked for the mismatches and could confirm at least one of them is as expected:
Edit: What finally worked was:
(note: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the changelog test. Might have to introduce an easier way to not run it, since the anonymous gh-api easily hits the API limit :/ Thanks, this looks good now.
Description
I added three functions to facilitate passing closures to component properties of type
Callback
. As noted in #2553, the documentation implies that this functionality already exists.Fixes #2553
Checklist
cargo make pr-flow