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

Remove bevy log's usage of non send resource #13252

Merged
merged 1 commit into from
May 6, 2024

Conversation

hymm
Copy link
Contributor

@hymm hymm commented May 6, 2024

Objective

I'm adopting #9122 and pulling some of the non controversial changes out to make the final pr easier to review.

This pr removes the NonSend resource usage from bevy_log.

Solution

tracing-chrome uses a guard that is stored in the world, so that when it is dropped the json log file is written out. The guard is Send + !Sync, so we can store it in a SyncCell to hold it in a regular resource instead of using a non send resource.

Testing

Tested by running an example with -F tracing chrome and making sure there weren't any errors and the json file was created.


Changelog

  • replaced bevy_log's usage of a non send resource.

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 6, 2024
@mockersf mockersf added this pull request to the merge queue May 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2024
@mockersf mockersf added this pull request to the merge queue May 6, 2024
Merged via the queue into bevyengine:main with commit fa0745f May 6, 2024
29 checks passed
@BD103 BD103 added C-Enhancement A new feature A-Diagnostics Logging, crash handling, error reporting and performance analysis labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Enhancement A new feature S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants