Skip to content

Conversation

@andriyDev
Copy link
Contributor

@andriyDev andriyDev commented Dec 20, 2025

Objective

  • In Instrument asset loading and processing. #12988, we added tracing spans to asset loading and processing, by creating wrapper structs InstrumentedAssetLoader and InstrumentedAssetProcessor.
  • Unfortunately, this causes an issue where ErasedAssetLoader::{default_meta, type_path} and ErasedProcessor::default_meta can return the wrong type path when using the trace feature, and this type path could be written into a meta file, which will be rendered unloadable/unprocessable.
    • Note even though the loader/processor's type use to have the instrumentation wrapper, when registering the loader/processor, we would actually register the loader/processor under the original type names. So you could still load non-trace written meta files, but trace written meta files would fail to load whether trace was enabled or not!

Solution

Testing

  • We still produce spans in the asset_processing example for both loading and processing.

Note: We don't need a migration guide since users should really not be using these directly, and any meta files using these would just be broken.

@andriyDev andriyDev added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 20, 2025
Copy link
Contributor

@kfc35 kfc35 left a comment

Choose a reason for hiding this comment

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

I appreciate fun test text!!
(Logic looks good)

@andriyDev andriyDev added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 21, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 22, 2025
Merged via the queue into bevyengine:main with commit bb23d0d Dec 22, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples 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