Update project configuration and snapshot files

- Changed the default project file from `plugin.project.json` to `plugin.project.json5` in `build.rs`.
- Added new project configuration files in JSON5 format for various test cases, including `default.project.json5`, `client_in_folder`, `csv_bug_145`, and others.
- Updated snapshot files to reflect changes in instance structure and properties, ensuring consistency with the new project configurations.
- Removed unnecessary script and module instances from snapshot files to streamline the testing process.
This commit is contained in:
Joe 2026-01-30 08:32:42 -06:00
parent d3cc11659a
commit 779e3de0ae
216 changed files with 350 additions and 514 deletions

View file

@ -75,7 +75,7 @@ fn main() -> Result<(), anyhow::Error> {
let template_snapshot = snapshot_from_fs_path(&templates_dir)?;
let plugin_snapshot = VfsSnapshot::dir(hashmap! {
"default.project.json" => snapshot_from_fs_path(&root_dir.join("plugin.project.json"))?,
"default.project.json5" => snapshot_from_fs_path(&root_dir.join("plugin.project.json5"))?,
"plugin" => VfsSnapshot::dir(hashmap! {
"fmt" => snapshot_from_fs_path(&plugin_dir.join("fmt"))?,
"http" => snapshot_from_fs_path(&plugin_dir.join("http"))?,

View file

@ -3,11 +3,9 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="Script" referent="0">
<Item class="Folder" referent="0">
<Properties>
<string name="Name">client_init</string>
<token name="RunContext">2</token>
<string name="Source">return "From folder/init.client.lua"</string>
</Properties>
</Item>
</roblox>

View file

@ -11,23 +11,11 @@ expression: contents
<Properties>
<string name="Name">src</string>
</Properties>
<Item class="ModuleScript" referent="2">
<Properties>
<string name="Name">outer.spec</string>
<string name="Source">-- This file should be included.</string>
</Properties>
</Item>
</Item>
<Item class="Folder" referent="3">
<Item class="Folder" referent="2">
<Properties>
<string name="Name">subproject</string>
</Properties>
<Item class="ModuleScript" referent="4">
<Properties>
<string name="Name">inner</string>
<string name="Source">-- This file should be included.</string>
</Properties>
</Item>
</Item>
</Item>
</roblox>

View file

@ -7,11 +7,5 @@ expression: contents
<Properties>
<string name="Name">ignore_glob_nested</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">include</string>
<string name="Source">-- This file must be present.</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -7,11 +7,5 @@ expression: contents
<Properties>
<string name="Name">ignore_glob_spec</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">shouldBeIncluded</string>
<string name="Source">-- this file should be present</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -3,16 +3,9 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="ModuleScript" referent="0">
<Item class="Folder" referent="0">
<Properties>
<string name="Name">init_with_children</string>
<string name="Source">-- init.lua</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">other</string>
<string name="Source">-- other.lua</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -7,11 +7,5 @@ expression: contents
<Properties>
<string name="Name">module_in_folder</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">aModule</string>
<string name="Source">-- This is a Lua module</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -3,10 +3,9 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="ModuleScript" referent="0">
<Item class="Folder" referent="0">
<Properties>
<string name="Name">module_init</string>
<string name="Source">return "From folder/init.lua"</string>
</Properties>
</Item>
</roblox>

View file

@ -1,2 +1,2 @@
# Issue #546 (https://github.com/rojo-rbx/rojo/issues/546)
Regression from Rojo 6.2.0 to Rojo 7.0.0. Meta files named as init.meta.json should apply after init.client.lua and other init files.
Regression from Rojo 6.2.0 to Rojo 7.0.0. Meta files named as init.meta.json5 should apply after init.client.luau and other init files.

View file

@ -1,7 +1,7 @@
{
"name": "sync_rule_nested_projects",
"tree": {
"$path": "nested.project.json"
"$path": "nested.project.json5"
},
"syncRules": [
{

View file

@ -1,20 +1,16 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children: []
ClassName: ModuleScript
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: edit_init
Parent: "00000000000000000000000000000000"
Properties:
Source:
String: "-- Original contents"
Properties: {}
messageCursor: 0
sessionId: id-1

View file

@ -4,53 +4,13 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children:
- id-3
ClassName: DataModel
Children: []
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: meshpart
ignoreUnknownInstances: false
Name: empty_folder
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children:
- id-4
- id-5
ClassName: Workspace
Id: id-3
Metadata:
ignoreUnknownInstances: true
Name: Workspace
Parent: id-2
Properties:
NeedsPivotMigration:
Bool: false
id-4:
Children: []
ClassName: ObjectValue
Id: id-4
Metadata:
ignoreUnknownInstances: true
Name: ObjectValue
Parent: id-3
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-5:
Children: []
ClassName: MeshPart
Id: id-5
Metadata:
ignoreUnknownInstances: true
Name: Sword
Parent: id-3
Properties:
MeshId:
ContentId: "rbxasset://fonts/sword.mesh"
TextureID:
ContentId: "rbxasset://textures/SwordTexture.png"
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(&info)
---
projectName: meshpart
projectName: empty_folder
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -9,7 +9,7 @@ instances:
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: move_folder_of_stuff
Name: edit_init
Parent: "00000000000000000000000000000000"
Properties: {}
messageCursor: 0

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: move_folder_of_stuff
projectName: edit_init
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -3,40 +3,114 @@ source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children:
- id-3
- id-4
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: ref_properties_remove
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
id-10:
Children: []
ClassName: ObjectValue
Id: id-3
Id: id-10
Metadata:
ignoreUnknownInstances: false
Name: pointer
Parent: id-2
ignoreUnknownInstances: true
Name: ProjectPointer
Parent: id-9
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-4
Ref: id-9
id-2:
Children:
- id-3
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: ref_properties
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children:
- id-4
- id-5
- id-7
- id-9
ClassName: Workspace
Id: id-3
Metadata:
ignoreUnknownInstances: true
Name: Workspace
Parent: id-2
Properties:
NeedsPivotMigration:
Bool: false
id-4:
Children: []
ClassName: ObjectValue
Id: id-4
Metadata:
ignoreUnknownInstances: false
Name: target
Parent: id-2
ignoreUnknownInstances: true
Name: CrossFormatPointer
Parent: id-3
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-5:
Children:
- id-6
ClassName: Folder
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: FolderTarget
Parent: id-3
Properties: {}
id-6:
Children: []
ClassName: ObjectValue
Id: id-6
Metadata:
ignoreUnknownInstances: false
Name: FolderPointer
Parent: id-5
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-7:
Children:
- id-8
ClassName: Folder
Id: id-7
Metadata:
ignoreUnknownInstances: false
Name: ModelTarget
Parent: id-3
Properties: {}
id-8:
Children: []
ClassName: Model
Id: id-8
Metadata:
ignoreUnknownInstances: false
Name: ModelPointer
Parent: id-7
Properties:
Attributes:
Attributes: {}
NeedsPivotMigration:
Bool: false
PrimaryPart:
Ref: id-7
id-9:
Children:
- id-10
ClassName: Folder
Id: id-9
Metadata:
ignoreUnknownInstances: true
Name: ProjectTarget
Parent: id-3
Properties: {}
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: ref_properties_remove
projectName: ref_properties
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -4,9 +4,7 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children:
- id-3
- id-4
Children: []
ClassName: Folder
Id: id-2
Metadata:
@ -14,29 +12,5 @@ instances:
Name: scripts
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: Script
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: bar
Parent: id-2
Properties:
RunContext:
Enum: 1
Source:
String: "-- Hello, from bar!"
id-4:
Children: []
ClassName: ModuleScript
Id: id-4
Metadata:
ignoreUnknownInstances: false
Name: foo
Parent: id-2
Properties:
Source:
String: "-- Hello, from foo!"
messageCursor: 0
sessionId: id-1

View file

@ -1,30 +1,16 @@
---
source: tests/tests/serve.rs
assertion_line: 268
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children:
- id-3
Children: []
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: sync_rule_alone
Name: scripts
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: StringValue
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: foo
Parent: id-2
Properties:
Value:
String: "Hello, world!"
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: sync_rule_alone
projectName: scripts
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -7,7 +7,7 @@
"$className": "Model"
},
"Tool": {
"$path": "Tool.model.json"
"$path": "Tool.model.json5"
}
}
}

View file

@ -16,7 +16,7 @@
}
},
"ModelTarget": {
"$path": "ModelTarget.model.json"
"$path": "ModelTarget.model.json5"
},
"FolderTarget": {
"$path": "FolderTarget"

Some files were not shown because too many files have changed in this diff Show more