Skip to content

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

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-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants