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 rust-analyzer non_camel_case_types warning #3388

Merged
merged 1 commit into from Sep 5, 2023

Conversation

sbruton
Copy link
Contributor

@sbruton sbruton commented Aug 28, 2023

Description

rust-analyzer currently complains with rust-analyzer(non_camel_case_types) warnings on all structs annotated with #[derive(Properites)]. This appears to have regressed from #2007. This PR resolves the warnings by annotating the generated struct with #[allow(non_camel_case_types)].

Checklist

  • I have reviewed my own code
  • I have added tests (does not seem applicable)

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Visit the preview URL for this PR (updated for commit c814399):

https://yew-rs-api--pr3388-master-xmwmoocc.web.app

(expires Tue, 05 Sep 2023 19:03:25 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 427.779 445.072 429.809 5.366
Hello World 10 781.423 824.073 790.012 17.013
Function Router 10 2493.089 2589.110 2509.735 28.363
Concurrent Task 10 1007.073 1010.256 1009.017 0.979
Many Providers 10 1744.442 1882.464 1780.586 48.921

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 428.069 428.456 428.235 0.121
Hello World 10 780.902 799.285 783.292 5.627
Function Router 10 2520.441 2528.878 2524.575 2.695
Concurrent Task 10 1007.312 1010.764 1008.929 1.116
Many Providers 10 1736.215 1759.871 1745.382 8.859

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 102.403 102.403 0 0.000%
boids 175.545 175.545 0 0.000%
communication_child_to_parent 95.226 95.226 0 0.000%
communication_grandchild_with_grandparent 108.894 108.894 0 0.000%
communication_grandparent_to_grandchild 105.533 105.533 0 0.000%
communication_parent_to_child 92.693 92.693 0 0.000%
contexts 110.888 110.888 0 0.000%
counter 89.208 89.208 0 0.000%
counter_functional 89.924 89.924 0 0.000%
dyn_create_destroy_apps 92.289 92.289 0 0.000%
file_upload 103.542 103.542 0 0.000%
function_memory_game 174.371 174.371 0 0.000%
function_router 352.188 352.188 0 0.000%
function_todomvc 163.350 163.350 0 0.000%
futures 227.721 227.721 0 0.000%
game_of_life 112.351 112.351 0 0.000%
immutable 188.939 188.939 0 0.000%
inner_html 86.017 86.017 0 0.000%
js_callback 112.993 112.993 0 0.000%
keyed_list 201.201 201.201 0 0.000%
mount_point 89.206 89.206 0 0.000%
nested_list 114.496 114.496 0 0.000%
node_refs 96.167 96.167 0 0.000%
password_strength 1582.850 1582.850 0 0.000%
portals 98.233 98.233 0 0.000%
router 318.178 318.178 0 0.000%
simple_ssr 143.637 143.637 0 0.000%
ssr_router 389.377 389.377 0 0.000%
suspense 118.697 118.697 0 0.000%
timer 91.809 91.809 0 0.000%
timer_functional 100.317 100.317 0 0.000%
todomvc 143.700 143.700 0 0.000%
two_apps 89.917 89.917 0 0.000%
web_worker_fib 154.515 154.515 0 0.000%
webgl 88.526 88.526 0 0.000%

✅ None of the examples has changed their size significantly.

futursolo
futursolo previously approved these changes Aug 29, 2023
Copy link
Member

@futursolo futursolo left a comment

Choose a reason for hiding this comment

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

Thanks for noticing this!

@sbruton
Copy link
Contributor Author

sbruton commented Aug 29, 2023

i'm not sure why but the issue has returned, doing some more research

@sbruton
Copy link
Contributor Author

sbruton commented Aug 29, 2023

This looks correct now with cargo exand showing the macro-generated elements appropraitely annotated. I'm going to watch it locally for a short while to make sure the issue doesn't recur.

@sbruton
Copy link
Contributor Author

sbruton commented Aug 29, 2023

LGTM

@sbruton sbruton marked this pull request as ready for review August 29, 2023 20:24
@hamza1311 hamza1311 added the A-yew-macro Area: The yew-macro crate label Sep 5, 2023
@hamza1311 hamza1311 merged commit 73f4bb9 into yewstack:master Sep 5, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-macro Area: The yew-macro crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants