-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Allow partial support for bevy_log
in no_std
#18782
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
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
Maybe depend on |
Definitely could do that, but I'd save that for a follow-up, this is already pretty lengthy for a last-minute RC update. |
i commented on the issue, but Edit: |
The issue is actually to do with I already have |
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.
Ok I think this is the move for now, given the current approach. I think the "virality" of both std
and web
is a maintenance liability and an "ecosystem UX" liability. Needing to know what dependencies are "std" or "web" is something we should avoid thrusting on users (and ourselves) whenever possible.
I've written out a potential path forward here: #18799
Co-Authored-By: François Mockers <[email protected]>
- Fixes #18781 - Moved `LogPlugin` into its own file gated behind a new `tracing` feature. - Used `log` instead of `tracing` where possible. - Exposed a new `tracing` feature in `bevy` which enables `bevy_log/tracing`. - Gated `LogPlugin` from `DefaultPlugins` on `tracing` feature. - CI --- - If you were previously using `bevy_log` with default features disabled, enable the new `std` and `tracing` features. - If you were using `bevy` with the default features disabled, enable the new `tracing` feature. Almost all of the diffs in this PR come from moving `LogPlugin` into its own file. This just makes the PR less noisy, since the alternative is excessive `#[cfg(feature = "tracing")]` directives all over the plugin. --------- Co-authored-by: François Mockers <[email protected]>
The move from
everywhere in my library for convenience, and now this causes conflicts because Even if I enable the If
That's a pretty change as the macros from |
…18816) This reverts commit ac52cca. Fixes #18815 # Objective #18782 resulted in using `log` macros instead of `tracing` macros (in the interest of providing no_std support, specifically no_atomic support). That tradeoff isn't worth it, especially given that tracing is likely to get no_atomic support. ## Solution Revert #18782
# Objective - Fixes bevyengine#18781 ## Solution - Moved `LogPlugin` into its own file gated behind a new `tracing` feature. - Used `log` instead of `tracing` where possible. - Exposed a new `tracing` feature in `bevy` which enables `bevy_log/tracing`. - Gated `LogPlugin` from `DefaultPlugins` on `tracing` feature. ## Testing - CI --- ## Migration Guide - If you were previously using `bevy_log` with default features disabled, enable the new `std` and `tracing` features. - If you were using `bevy` with the default features disabled, enable the new `tracing` feature. ## Notes Almost all of the diffs in this PR come from moving `LogPlugin` into its own file. This just makes the PR less noisy, since the alternative is excessive `#[cfg(feature = "tracing")]` directives all over the plugin. --------- Co-authored-by: François Mockers <[email protected]>
…18782)" (bevyengine#18816) This reverts commit ac52cca. Fixes bevyengine#18815 # Objective bevyengine#18782 resulted in using `log` macros instead of `tracing` macros (in the interest of providing no_std support, specifically no_atomic support). That tradeoff isn't worth it, especially given that tracing is likely to get no_atomic support. ## Solution Revert bevyengine#18782
Objective
no_std
support tobevy_log
#18781Solution
LogPlugin
into its own file gated behind a newtracing
feature.log
instead oftracing
where possible.tracing
feature inbevy
which enablesbevy_log/tracing
.LogPlugin
fromDefaultPlugins
ontracing
feature.Testing
Migration Guide
bevy_log
with default features disabled, enable the newstd
andtracing
features.bevy
with the default features disabled, enable the newtracing
feature.Notes
Almost all of the diffs in this PR come from moving
LogPlugin
into its own file. This just makes the PR less noisy, since the alternative is excessive#[cfg(feature = "tracing")]
directives all over the plugin.