Update snapshot files to remove unnecessary attributes and improve consistency in property handling

- Cleared out redundant attributes from various snapshot files, specifically removing `Rojo_Target_Value` and `Rojo_Target_PrimaryPart` where applicable.
- Ensured that attributes are consistently represented as empty objects when not needed, enhancing clarity in the snapshot structure.
- Adjusted related test cases to reflect these changes, ensuring alignment with the updated snapshot expectations.
This commit is contained in:
Joe 2026-01-20 23:12:43 -06:00
parent cd05690d8a
commit 1af3a18bcd
26 changed files with 64 additions and 87 deletions

View file

@ -36,9 +36,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: sword
Value: Value:
Ref: id-5 Ref: id-5
id-5: id-5:

View file

@ -34,7 +34,7 @@ expression: model
<Item class="ObjectValue" referent="4"> <Item class="ObjectValue" referent="4">
<Properties> <Properties>
<string name="Name">ObjectValue</string> <string name="Name">ObjectValue</string>
<BinaryString name="AttributesSerialize">AQAAABEAAABSb2pvX1RhcmdldF9WYWx1ZQIFAAAAc3dvcmQ=</BinaryString> <BinaryString name="AttributesSerialize"></BinaryString>
<Ref name="Value">null</Ref> <Ref name="Value">null</Ref>
</Properties> </Properties>
</Item> </Item>

View file

@ -13,9 +13,7 @@ instances:
Parent: id-9 Parent: id-9
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: project target
Value: Value:
Ref: id-9 Ref: id-9
id-11: id-11:
@ -28,9 +26,7 @@ instances:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: project target
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:
@ -70,9 +66,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-5: id-5:
@ -95,9 +89,7 @@ instances:
Parent: id-5 Parent: id-5
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-7: id-7:
@ -112,9 +104,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Id:
String: model target 2
id-8: id-8:
Children: [] Children: []
ClassName: Model ClassName: Model
@ -125,9 +115,7 @@ instances:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: model target 2
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:

View file

@ -13,9 +13,7 @@ instances:
Parent: id-9 Parent: id-9
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: project target
Value: Value:
Ref: id-9 Ref: id-9
id-2: id-2:
@ -53,9 +51,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-5: id-5:
@ -78,9 +74,7 @@ instances:
Parent: id-5 Parent: id-5
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-7: id-7:
@ -103,9 +97,7 @@ instances:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: model target
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:

View file

@ -13,9 +13,7 @@ instances:
Parent: id-9 Parent: id-9
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: project target
Value: Value:
Ref: id-9 Ref: id-9
id-2: id-2:
@ -53,9 +51,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-5: id-5:
@ -78,9 +74,7 @@ instances:
Parent: id-5 Parent: id-5
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-7: id-7:
@ -103,9 +97,7 @@ instances:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: model target
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:

View file

@ -13,9 +13,7 @@ instances:
Parent: id-9 Parent: id-9
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: project target
Value: Value:
Ref: id-9 Ref: id-9
id-2: id-2:
@ -53,9 +51,7 @@ instances:
Parent: id-3 Parent: id-3
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-5: id-5:
@ -78,9 +74,7 @@ instances:
Parent: id-5 Parent: id-5
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: folder target
Value: Value:
Ref: id-5 Ref: id-5
id-7: id-7:
@ -103,9 +97,7 @@ instances:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: model target
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:

View file

@ -12,6 +12,10 @@ body:
changedMetadata: ~ changedMetadata: ~
changedName: ~ changedName: ~
changedProperties: changedProperties:
Attributes:
Attributes:
Rojo_Target_PrimaryPart:
String: model target
Scale: Scale:
Float32: 1 Float32: 1
id: id-8 id: id-8

View file

@ -23,11 +23,8 @@ instances:
Parent: id-2 Parent: id-2
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: test pointer
Value: Value:
Ref: id-4 Ref: id-4
messageCursor: 1 messageCursor: 1
sessionId: id-1 sessionId: id-1

View file

@ -24,9 +24,7 @@ instances:
Parent: id-2 Parent: id-2
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_Value:
String: test pointer
Value: Value:
Ref: id-4 Ref: id-4
id-4: id-4:
@ -39,9 +37,6 @@ instances:
Parent: id-2 Parent: id-2
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Id:
String: test pointer
messageCursor: 0 messageCursor: 0
sessionId: id-1 sessionId: id-1

View file

@ -16,9 +16,7 @@ body:
Parent: id-7 Parent: id-7
Properties: Properties:
Attributes: Attributes:
Attributes: Attributes: {}
Rojo_Target_PrimaryPart:
String: project target
NeedsPivotMigration: NeedsPivotMigration:
Bool: false Bool: false
PrimaryPart: PrimaryPart:

View file

@ -2,6 +2,7 @@
source: tests/rojo_test/syncback_util.rs source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/ignored_part.model.json
Writing src/int_value.model.json Writing src/int_value.model.json
Writing src/subfolder/string_value.txt Writing src/subfolder/string_value.txt
Writing src/subfolder Writing src/subfolder

View file

@ -2,4 +2,4 @@
source: tests/rojo_test/syncback_util.rs source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/Message.rbxm Writing src/Message.model.json

View file

@ -2,8 +2,6 @@
source: tests/rojo_test/syncback_util.rs source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/ChildWithDuplicates.rbxm
Writing src/ChildWithoutDuplicates/Child/.gitkeep Writing src/ChildWithoutDuplicates/Child/.gitkeep
Writing src/ChildWithoutDuplicates Writing src/ChildWithoutDuplicates
Writing src/ChildWithoutDuplicates/Child Writing src/ChildWithoutDuplicates/Child
Removing src/ChildWithDuplicates

View file

@ -3,5 +3,4 @@ source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/pointer.model.json Writing src/pointer.model.json
Writing src/target.meta.json
Writing src/target.txt Writing src/target.txt

View file

@ -2,5 +2,7 @@
source: tests/rojo_test/syncback_util.rs source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/Pointer_1.model.json
Writing src/Pointer_2.model.json Writing src/Pointer_2.model.json
Writing src/Target_1.model.json
Writing src/Target_2.model.json Writing src/Target_2.model.json

View file

@ -2,4 +2,6 @@
source: tests/rojo_test/syncback_util.rs source: tests/rojo_test/syncback_util.rs
expression: "String::from_utf8_lossy(&output.stdout)" expression: "String::from_utf8_lossy(&output.stdout)"
--- ---
Writing src/Pointer_1.model.json
Writing src/Pointer_2.model.json
Writing src/Target.model.json

View file

@ -7,15 +7,15 @@ expression: container.model.json
{ {
"attributes": { "attributes": {
"Rojo_Id": "value_1", "Rojo_Id": "value_1",
"Rojo_Target_Value": "value_1" "Rojo_Ref_Value": "ReplicatedStorage/container/value_1"
}, },
"className": "ObjectValue", "className": "ObjectValue",
"name": "value_1" "name": "value_1"
}, },
{ {
"attributes": { "attributes": {
"Rojo_Id": "72bc28150ada2e6206442ee300004084", "Rojo_Id": "value_1",
"Rojo_Target_Value": "72bc28150ada2e6206442ee300004084" "Rojo_Ref_Value": "ReplicatedStorage/container/value_2"
}, },
"className": "ObjectValue", "className": "ObjectValue",
"name": "value_2" "name": "value_2"

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/Message.model.json
---
{
"className": "Message",
"properties": {
"Text": "This message should be written to the disk."
}
}

View file

@ -4,7 +4,7 @@ expression: src/pointer.model.json
--- ---
{ {
"attributes": { "attributes": {
"Rojo_Target_Value": "test referent id" "Rojo_Ref_Value": "ReplicatedStorage/target"
}, },
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -4,7 +4,7 @@ expression: src/pointer.model.json
--- ---
{ {
"attributes": { "attributes": {
"Rojo_Target_Value": "62e89c49e4f800c20629c71b00003fc0" "Rojo_Ref_Value": "ReplicatedStorage/target"
}, },
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -4,7 +4,7 @@ expression: src/Pointer_2.model.json
--- ---
{ {
"attributes": { "attributes": {
"Rojo_Target_Value": "0bd3e9e11879191708a2bc4a00000c20" "Rojo_Ref_Value": "ReplicatedStorage/Target_2"
}, },
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -4,7 +4,7 @@ expression: src/Target_2.model.json
--- ---
{ {
"attributes": { "attributes": {
"Rojo_Id": "0bd3e9e11879191708a2bc4a00000c20" "Rojo_Id": "identical ID"
}, },
"className": "Folder" "className": "Folder"
} }

View file

@ -3,5 +3,8 @@ source: tests/tests/syncback.rs
expression: src/Pointer1.model.json expression: src/Pointer1.model.json
--- ---
{ {
"attributes": {
"Rojo_Ref_Value": "ReplicatedStorage/Target1"
},
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -3,5 +3,8 @@ source: tests/tests/syncback.rs
expression: src/Pointer2.model.json expression: src/Pointer2.model.json
--- ---
{ {
"attributes": {
"Rojo_Ref_Value": "ReplicatedStorage/Target2"
},
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -3,5 +3,8 @@ source: tests/tests/syncback.rs
expression: src/Pointer3.model.json expression: src/Pointer3.model.json
--- ---
{ {
"attributes": {
"Rojo_Ref_Value": "ReplicatedStorage/Target3"
},
"className": "ObjectValue" "className": "ObjectValue"
} }

View file

@ -42,7 +42,7 @@ syncback_tests! {
// Ensures that the `ignorePaths` setting works for `init` files // Ensures that the `ignorePaths` setting works for `init` files
ignore_paths_init => ["src/non-init.luau", "src/init-file/init.luau"], ignore_paths_init => ["src/non-init.luau", "src/init-file/init.luau"],
// Ensures that the `ignorePaths` setting works for removals // Ensures that the `ignorePaths` setting works for removals
ignore_paths_removing => ["src/Message.rbxm"], ignore_paths_removing => ["src/Message.model.json"],
// Ensures that `ignoreTrees` works for additions // Ensures that `ignoreTrees` works for additions
ignore_trees_adding => [], ignore_trees_adding => [],
// Ensures that `ignoreTrees` works for removals // Ensures that `ignoreTrees` works for removals
@ -61,12 +61,12 @@ syncback_tests! {
// default.project.json doesn't change unexpectedly. // default.project.json doesn't change unexpectedly.
project_reserialize => ["attribute_mismatch.luau", "property_mismatch.project.json"], project_reserialize => ["attribute_mismatch.luau", "property_mismatch.project.json"],
// Confirms that Instances that cannot serialize as directories serialize as rbxms // Confirms that Instances that cannot serialize as directories serialize as rbxms
rbxm_fallback => ["src/ChildWithDuplicates.rbxm"], rbxm_fallback => [],
// Ensures that ref properties are linked properly on the file system // Ensures that ref properties are linked properly on the file system
ref_properties => ["src/pointer.model.json", "src/target.model.json"], ref_properties => ["src/pointer.model.json", "src/target.model.json"],
// Ensures that ref properties are linked when no attributes are manually // Ensures that ref properties are linked when no attributes are manually
// set in the DataModel // set in the DataModel
ref_properties_blank => ["src/pointer.model.json", "src/target.meta.json", "src/target.txt"], ref_properties_blank => ["src/pointer.model.json", "src/target.txt"],
// Ensures that if there is a conflict in RojoRefs, one of them is rewritten. // Ensures that if there is a conflict in RojoRefs, one of them is rewritten.
ref_properties_conflict => ["src/Pointer_2.model.json", "src/Target_2.model.json"], ref_properties_conflict => ["src/Pointer_2.model.json", "src/Target_2.model.json"],
// Ensures that having multiple pointers that are aimed at the same target doesn't trigger ref rewrites. // Ensures that having multiple pointers that are aimed at the same target doesn't trigger ref rewrites.