forked from rojo-rbx/rojo
Support nested partitions and partitions directly targeting services (#122)
* Do the nested partition thing * Tidy up touched code * Add nested partition test project, not fully functional * Clean up variable names, move path_metadata mutation strictly into snapshot_reconciler * Remove path_metadata, snapshotting is now pure * Factor out snapshot metadata storage to fix a missing case * Pull instance_name out of per_path_metadata, closer to what we need * Refactor to make metadata make more sense, part one * All appears to be well * Cull 'metadata_per_path' in favor of 'instances_per_path' * Remove SnapshotContext * InstanceMetadata -> PublicInstanceMetadata in web module * Build in snapshot testing system for testing... snapshots? * Remove pretty_assertions to see if it fixes a snapshot comparison bug * Reintroduce pretty assertions, it's not the cause of inequality * Fix snapshot tests with custom relative path serializer
This commit is contained in:
committed by
GitHub
parent
38e3c198f2
commit
ecb9b5e28f
9
test-projects/nested_partitions/default.project.json
Normal file
9
test-projects/nested_partitions/default.project.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "nested-partitions",
|
||||
"tree": {
|
||||
"$path": "outer",
|
||||
"inner": {
|
||||
"$path": "inner"
|
||||
}
|
||||
}
|
||||
}
|
||||
82
test-projects/nested_partitions/expected-snapshot.json
Normal file
82
test-projects/nested_partitions/expected-snapshot.json
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"name": "nested-partitions",
|
||||
"class_name": "Folder",
|
||||
"properties": {},
|
||||
"children": [
|
||||
{
|
||||
"name": "inner",
|
||||
"class_name": "Folder",
|
||||
"properties": {},
|
||||
"children": [
|
||||
{
|
||||
"name": "hello",
|
||||
"class_name": "ModuleScript",
|
||||
"properties": {
|
||||
"Source": {
|
||||
"Type": "String",
|
||||
"Value": "-- inner/hello.lua"
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "inner/hello.lua",
|
||||
"project_definition": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "inner",
|
||||
"project_definition": [
|
||||
"inner",
|
||||
{
|
||||
"class_name": null,
|
||||
"children": {},
|
||||
"properties": {},
|
||||
"ignore_unknown_instances": null,
|
||||
"path": "inner"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"class_name": "ModuleScript",
|
||||
"properties": {
|
||||
"Source": {
|
||||
"Type": "String",
|
||||
"Value": "-- outer/world.lua"
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "outer/world.lua",
|
||||
"project_definition": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"ignore_unknown_instances": false,
|
||||
"source_path": "outer",
|
||||
"project_definition": [
|
||||
"nested-partitions",
|
||||
{
|
||||
"class_name": null,
|
||||
"children": {
|
||||
"inner": {
|
||||
"class_name": null,
|
||||
"children": {},
|
||||
"properties": {},
|
||||
"ignore_unknown_instances": null,
|
||||
"path": "inner"
|
||||
}
|
||||
},
|
||||
"properties": {},
|
||||
"ignore_unknown_instances": null,
|
||||
"path": "outer"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
1
test-projects/nested_partitions/inner/hello.lua
Normal file
1
test-projects/nested_partitions/inner/hello.lua
Normal file
@@ -0,0 +1 @@
|
||||
-- inner/hello.lua
|
||||
1
test-projects/nested_partitions/outer/world.lua
Normal file
1
test-projects/nested_partitions/outer/world.lua
Normal file
@@ -0,0 +1 @@
|
||||
-- outer/world.lua
|
||||
Reference in New Issue
Block a user