-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Fix: "The build mesh uniforms pipeline wasn't ready” warning now fires only once #22398
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
Conversation
2f00bbd to
d2b570e
Compare
d2b570e to
2aa5625
Compare
alice-i-cecile
left a comment
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.
We have a dedicated warn_once! macro for exactly this :)
Hah I had that initially but then changed it to I'll change it back to |
…s only once (#22398) - Fixes #22358 - Use `warn_once` for the log message (and add `bevy_log` as a dependency for `bevy_pbr`) I added `main.rs` in the reproduction repo https://github.com/logankaser/bevy-uniforms-pipeline-repro/blob/main/src/main.rs as an example file in the main `bevy` repo and ran it with `bevy run --example repro --features=bevy_camera,bevy_core_pipeline,bevy_log,bevy_pbr,bevy_render,bevy_window,bevy_winit,webgpu web --open`. I opened up the app in Chrome and verified in the console log that the warning only fires once <details> <summary>screenshots of console logs</summary> In google chrome beforehand, you see the spam in the console: <img width="705" height="285" alt="Screenshot 2026-01-05 at 10 04 57 PM" src="https://github.com/user-attachments/assets/7fe4cb1c-2df3-4d3b-a80d-4dfdaf2efb68" /> After the change, it just warns once: <img width="728" height="62" alt="Screenshot 2026-01-06 at 12 06 14 AM" src="https://github.com/user-attachments/assets/c269f10e-1a7f-4daf-a8c8-dc812895eb68" /> </details>
Objective
Solution
warn_oncefor the log message (and addbevy_logas a dependency forbevy_pbr)Testing
I added
main.rsin the reproduction repo https://github.com/logankaser/bevy-uniforms-pipeline-repro/blob/main/src/main.rs as an example file in the mainbevyrepo and ran it withbevy run --example repro --features=bevy_camera,bevy_core_pipeline,bevy_log,bevy_pbr,bevy_render,bevy_window,bevy_winit,webgpu web --open.I opened up the app in Chrome and verified in the console log that the warning only fires once
screenshots of console logs
In google chrome beforehand, you see the spam in the console:After the change, it just warns once:
