Skip to content

Make write_default_meta_file_for_path write the short type path instead of the long type path.#22208

Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom
andriyDev:short-default-meta
Feb 22, 2026
Merged

Make write_default_meta_file_for_path write the short type path instead of the long type path.#22208
alice-i-cecile merged 3 commits intobevyengine:mainfrom
andriyDev:short-default-meta

Conversation

@andriyDev
Copy link
Contributor

@andriyDev andriyDev commented Dec 20, 2025

Objective

Solution

  • Make ErasedProcessor have a method for returning its short_type_path, and make its default_meta method take an enum to choose between using the short or long type path.
  • When generating the default meta, first lookup the processor using its short type name. If it's ambiguous, use the long type path.
  • Add tests to show the short/long selection. As part of this, I forced all meta files to be serialized with \n as the new line character.
  • Bonus: add more tests for write_default_meta_file_for_path and write_default_loader_meta_file_for_path which were omitted in Stop automatically generating meta files for assets while using asset processing. #17216 due to missing appropriate testing utilities (specifically a memory asset writer).

Testing

  • Added tests!

@andriyDev andriyDev added 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 C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 20, 2025
@andriyDev andriyDev marked this pull request as draft December 20, 2025 08:41
@andriyDev andriyDev removed the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Dec 20, 2025
@andriyDev andriyDev force-pushed the short-default-meta branch 2 times, most recently from 202b7d4 to 3360341 Compare December 23, 2025 00:40
@andriyDev andriyDev marked this pull request as ready for review December 23, 2025 01:19
@andriyDev andriyDev added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Dec 23, 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.

Another test case you could add if you wanted to is that it still writes the short type with two processors that are unique (not ambiguous), or you could just augment the existing test for writes_short_default_meta_for_processor with a second unique processor registered, but this suggestion can be ignored

@cart cart added this to Assets Feb 12, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Assets Feb 12, 2026
@alice-i-cecile alice-i-cecile 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 Feb 22, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 22, 2026
Merged via the queue into bevyengine:main with commit e5d31d2 Feb 22, 2026
40 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in Assets Feb 22, 2026
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-Refinement Improves output quality, without fixing a clear bug or adding new functionality. 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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants