Move an asset's MetaTransform into its AssetInfo. - #25509
Open
andriyDev wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
This is based off of #25506. I'll rebase it once that's merged. |
andriyDev
force-pushed
the
meta-transform-in-info
branch
from
August 22, 2026 05:23
7ad17a7 to
50631c2
Compare
Zeophlite
approved these changes
Aug 22, 2026
greeble-dev
reviewed
Aug 25, 2026
greeble-dev
left a comment
Contributor
There was a problem hiding this comment.
Two minor suggestions. Will review again once rebased.
Comment on lines
+52
to
+56
| // Manual Debug impl since MetaTransform is not Debug. | ||
| impl core::fmt::Debug for AssetInfo { | ||
| fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
| f.debug_struct("AssetInfo") | ||
| .field("weak_handle", &self.weak_handle) |
Contributor
There was a problem hiding this comment.
Maybe better to make MetaTransform a newtype with a Debug implementation that prints something like "[closure]"? Not a big deal though.
Contributor
Author
There was a problem hiding this comment.
Meh, I personally don't care about this, and I think new typing this everywhere isn't very useful since it's not a public type anyway - it's just an implementation detail.
andriyDev
force-pushed
the
meta-transform-in-info
branch
from
August 26, 2026 05:36
50631c2 to
e9d26cf
Compare
greeble-dev
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Solution
AssetInfo. This is the canonical location of info about the asset, and it is centralized.This makes it easier to create handles for an asset, since now you only need the path + type ID, and you don't have to be confused about the meta transform. I don't think this makes it any harder to solve #11111, since we'll need to store the meta transform somewhere on the
AssetInfos to be able to reload them, and it feels weird to need to upgrade a handle just to fetch its meta transform.Note that accessing the meta transform isn't particularly informative. In order to get anything useful out of it, you'd need to know what loader it's targeting, then apply the meta transform, and then read the mutated settings. Very confusing! If we are to solve #11111, we need something more interpretable other than a function (since we can't diff a function).
Testing