Merged
Conversation
… of the file. They now just get the path of the file itself. Also improve a few spots where errors were preemptively constructed
… conflicts with an existing asset. This can now happen since conflicts can occur across files with the addition of simplifying the path for the special cased first asset in a file.
…y can be created as objects that aren't inline sub-objects
…first path will be adjusted to match the file
… for new places an asset for a file can be when the asset path is simplified
Imberflur
commented
Feb 11, 2026
MavethGH
reviewed
Feb 11, 2026
MavethGH
reviewed
Feb 11, 2026
Comment on lines
+405
to
+406
| /// naming logic. Note, a number representing the type id of the current subobject may be | ||
| /// appended to the parent object name. |
Contributor
There was a problem hiding this comment.
When and why do we append that type id number?
Contributor
Author
There was a problem hiding this comment.
This is done in here
bauble/bauble/src/value/convert.rs
Line 1064 in 1210f4f
bauble/bauble/src/value/convert.rs
Line 427 in 1210f4f
The reasoning I have seen in documentation in our editor code is:
/// These sub-objects will have some path like `path::to::root::object&23&34@0`. The numbers are
/// there to give sub-objects more unique names to make hot-reloading assets better. And are based
/// on the types of the object. And the number `@0` at the end is there to make sure the name is unique.
I think it basically somewhat alleviates the issue that an array, optional field or similar, could effect the names of sub-objects in all following fields when an item is added/removed. I say "somewhat" because if the sub-objects across fields had common types then this would not change anything.
MavethGH
approved these changes
Feb 11, 2026
Co-authored-by: MavethGH <65792235+MavethGH@users.noreply.github.com>
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.
This is "stage 1" in converting bauble to a file per top level asset scheme.
Additionally there are changes to support having our bauble editor work with local assets instead of inline assets.
Asset per file
If an object appears first in the file and its name matches the file's name, its path will now be simplified to the path of the file. Additionally, the object will be marked as
top_level(via a new field onObjectand as a property available on assets inPathReference).Custom naming for additional objects
We add
AdditionalUnspannedObjects::new_with_custom_namer.AdditionalUnspannedObjectsis used when creating new values that need to also create additional objects that they reference. This new method allows custom names instead of creating all new referenced objects as inline sub-objects.Misc changes
Removed newline at the beginning of
display_formattedoutput and added a newline at the end. Now files generated with this will have a trailing newline.Exposed constant used for the builtin
Reftype's path so external code can reliably identify the builtinReftype.