Skip to content

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
@BD103 BD103 added C-Feature A new feature, making something new possible A-Diagnostics Logging, crash handling, error reporting and performance analysis labels May 7, 2024
@hymm hymm deleted the remove-non-send-bevy-log branch October 14, 2024 01:26
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-Feature A new feature, making something new possible 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.

4 participants