mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Add Luau-style ref paths migration plan and update related tests
- Introduced a new migration plan for converting `Rojo_Ref_*` attribute paths to Luau require-by-string style, enhancing portability with relative paths. - Updated existing test snapshots to reflect the new path formats, ensuring consistency across various scenarios. - Enhanced the `compute_relative_ref_path` and `resolve_ref_path` functions to support the new path semantics, improving path resolution logic. - Refactored related code in `change_processor`, `syncback`, and `snapshot` modules to accommodate the new reference path handling. These changes improve the robustness and maintainability of reference path management in the project.
This commit is contained in:
parent
d6169c6d84
commit
b8c3520d25
29 changed files with 2147 additions and 179 deletions
|
|
@ -15,7 +15,7 @@ body:
|
|||
Attributes:
|
||||
"!Attributes":
|
||||
Rojo_Ref_PrimaryPart:
|
||||
"!String": Workspace/MyModel/OtherPart
|
||||
"!String": "@self/OtherPart"
|
||||
PrimaryPart:
|
||||
"!Ref": id-4
|
||||
id: id-3
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ body:
|
|||
Attributes:
|
||||
"!Attributes":
|
||||
Rojo_Ref_CustomRef:
|
||||
"!String": Workspace/MyModel/OtherPart
|
||||
"!String": "@self/OtherPart"
|
||||
Rojo_Ref_PrimaryPart:
|
||||
"!String": Workspace/MyModel/Target
|
||||
"!String": "@self/Target"
|
||||
CustomRef:
|
||||
"!Ref": id-4
|
||||
id: id-3
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ body:
|
|||
Attributes:
|
||||
"!Attributes":
|
||||
Rojo_Ref_PrimaryPart:
|
||||
"!String": Workspace/MyModel/Target
|
||||
"!String": "@self/Target"
|
||||
id: id-3
|
||||
packetType: messages
|
||||
sessionId: id-1
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ body:
|
|||
Attributes:
|
||||
"!Attributes":
|
||||
Rojo_Ref_PrimaryPart:
|
||||
"!String": Workspace/NonExistent/Part
|
||||
"!String": "./NonExistent/Part"
|
||||
PrimaryPart: ~
|
||||
id: id-3
|
||||
packetType: messages
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"className": "Model",
|
||||
"attributes": {
|
||||
"Rojo_Ref_PrimaryPart": "Workspace/MyModel/Target"
|
||||
"Rojo_Ref_PrimaryPart": "@self/Target"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"className": "Model",
|
||||
"attributes": {
|
||||
"Rojo_Ref_PrimaryPart": "Workspace/TestModel/Part1.model.json5"
|
||||
"Rojo_Ref_PrimaryPart": "@self/Part1.model.json5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ expression: container.model.json5
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_1.model.json5"
|
||||
Rojo_Ref_Value: "@self"
|
||||
},
|
||||
className: "ObjectValue",
|
||||
name: "value_1"
|
||||
|
|
@ -15,7 +15,7 @@ expression: container.model.json5
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_2.model.json5"
|
||||
Rojo_Ref_Value: "@self"
|
||||
},
|
||||
className: "ObjectValue",
|
||||
name: "value_2"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/pointer.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "target.model.json5"
|
||||
Rojo_Ref_Value: "@game/target.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/pointer.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "target.txt"
|
||||
Rojo_Ref_Value: "@game/target.txt"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer_2.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "Target_2.model.json5"
|
||||
Rojo_Ref_Value: "@game/Target_2.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer1.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target1.model.json5"
|
||||
Rojo_Ref_Value: "@game/ReplicatedStorage/Target1.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer2.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target2.model.json5"
|
||||
Rojo_Ref_Value: "@game/ReplicatedStorage/Target2.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer3.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target3.model.json5"
|
||||
Rojo_Ref_Value: "@game/ReplicatedStorage/Target3.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Ref_SoundGroup: "ServerStorage/__server_muted.model.json5"
|
||||
Rojo_Ref_SoundGroup: "../../__server_muted.model.json5"
|
||||
},
|
||||
className: "Sound",
|
||||
properties: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Ref_PrimaryPart: "ServerStorage/UFOWave/TsunamiWave",
|
||||
Rojo_Ref_PrimaryPart: "@self/TsunamiWave",
|
||||
Speed: 10,
|
||||
ZonesPassed: {
|
||||
Float32: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue