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 CI #3679

Merged
merged 9 commits into from
Jul 25, 2024
Merged

Fix CI #3679

merged 9 commits into from
Jul 25, 2024

Conversation

kawadakk
Copy link
Contributor

@kawadakk kawadakk commented Jul 9, 2024

Description

Fixes new rustc and clippy warnings that are generated by the latest Rust toolchain and causing CI failures.

Checklist

  • I have reviewed my own code
  • I have added tests

…yew_lints)`

`dead_code` has become more precise in recent toolchains.
…o an empty `Vec<VNode>`

The old code triggered `static_mut_refs` lint in the latest stable
toolchain.
Addresses `clippy::thread_local_initializer_can_be_made_const`.
May provide performance benefits.
Copy link

github-actions bot commented Jul 9, 2024

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.856 ns      │ 3.097 ns      │ 2.876 ns      │ 2.886 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.859 ns      │ 3.054 ns      │ 2.877 ns      │ 2.882 ns      │ 100     │ 1000000000

Copy link

github-actions bot commented Jul 9, 2024

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

https://yew-rs-api--pr3679-patch-fix-ci-ny64jsqt.web.app

(expires Tue, 16 Jul 2024 09:59:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Copy link

github-actions bot commented Jul 9, 2024

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 308.901 309.562 309.103 0.236
Hello World 10 494.498 498.390 496.424 1.102
Function Router 10 1674.207 1697.817 1683.128 8.423
Concurrent Task 10 1005.902 1006.668 1006.316 0.236
Many Providers 10 1119.256 1163.173 1132.352 13.766

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 289.331 289.803 289.529 0.128
Hello World 10 492.629 503.244 496.281 3.786
Function Router 10 1611.269 1637.976 1625.416 7.206
Concurrent Task 10 1005.849 1007.332 1006.600 0.563
Many Providers 10 1123.441 1203.859 1152.173 26.208

Copy link

github-actions bot commented Jul 9, 2024

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 97.643 97.604 -0.039 -0.040%
boids 167.796 167.741 -0.055 -0.033%
communication_child_to_parent 90.183 90.134 -0.049 -0.054%
communication_grandchild_with_grandparent 102.416 102.355 -0.061 -0.059%
communication_grandparent_to_grandchild 97.852 97.791 -0.061 -0.062%
communication_parent_to_child 86.538 86.489 -0.049 -0.056%
contexts 102.006 101.923 -0.083 -0.081%
counter 83.183 83.136 -0.047 -0.056%
counter_functional 83.607 83.568 -0.039 -0.047%
dyn_create_destroy_apps 86.537 86.488 -0.049 -0.056%
file_upload 97.578 97.539 -0.039 -0.040%
function_memory_game 163.901 163.817 -0.084 -0.051%
function_router 337.271 337.039 -0.232 -0.069%
function_todomvc 157.901 157.829 -0.072 -0.046%
futures 225.778 225.731 -0.047 -0.021%
game_of_life 105.264 105.221 -0.043 -0.041%
immutable 185.600 184.462 -1.138 -0.613%
inner_html 77.536 77.489 -0.047 -0.060%
js_callback 105.766 105.699 -0.066 -0.063%
keyed_list 195.321 195.272 -0.049 -0.025%
mount_point 80.511 80.464 -0.047 -0.058%
nested_list 111.245 111.185 -0.061 -0.054%
node_refs 87.853 87.804 -0.049 -0.056%
password_strength 1711.744 1711.695 -0.049 -0.003%
portals 90.756 90.707 -0.049 -0.054%
router 307.977 307.785 -0.191 -0.062%
simple_ssr 137.708 137.644 -0.064 -0.047%
ssr_router 374.545 374.318 -0.227 -0.060%
suspense 112.039 111.961 -0.078 -0.070%
timer 86.099 86.060 -0.039 -0.045%
timer_functional 94.852 94.803 -0.049 -0.051%
todomvc 139.051 138.972 -0.079 -0.057%
two_apps 83.206 83.159 -0.047 -0.056%
web_worker_fib 131.457 131.396 -0.061 -0.046%
web_worker_prime 181.890 181.829 -0.061 -0.033%
webgl 80.212 80.173 -0.039 -0.049%

✅ None of the examples has changed their size significantly.

…ue::pop_topmost` if Rust version >= 1.66

The use of `BTreeMap::pop_first` (stabilized in 1.66) is already gated by
`#[rustversion(since(1.66))]` hence we can ignore this warning.
…ered,props_changed}` by `cfg(feature = "csr")`

Addresses `dead_code` lint.
Addresses `clippy::assigning_clones` lint.
@ranile
Copy link
Member

ranile commented Jul 18, 2024

@kawadakk if you wanna merge this without benchmarks, that is fine by me. The benchmarks CI is failing right now because it cannot find google-chrome (I don't know why; if you want to give a shot at fixing it, feel free to)

@kawadakk kawadakk marked this pull request as ready for review July 23, 2024 07:07
@kawadakk
Copy link
Contributor Author

I don't have time to investigate at the moment, but I suspect that the benchmark CI failure might be caused by puppteeer no longer accepting non-full paths (ref).

Copy link
Member

@ranile ranile left a comment

Choose a reason for hiding this comment

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

Rust CI being green is definitely an improvement. Thanks for the PR

@ranile ranile enabled auto-merge (squash) July 24, 2024 15:41
@ranile ranile merged commit af68646 into yewstack:master Jul 25, 2024
24 of 25 checks passed
@kawadakk kawadakk deleted the patch/fix-ci branch July 25, 2024 04:03
@WorldSEnder WorldSEnder added A-ci Area: The continuous integration A-yew Area: The main yew crate A-yew-router Area: The yew-router crate labels Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration A-yew Area: The main yew crate A-yew-router Area: The yew-router crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants