forked from rojo-rbx/rojo
-
Notifications
You must be signed in to change notification settings - Fork 9
Filter default properties in json middlewares instead of filter fn #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kennethloeffler
wants to merge
20
commits into
UpliftGames:syncback-merge
Choose a base branch
from
kennethloeffler:dont-filter-default-props
base: syncback-merge
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f635cdc
Filter default properties in json middlewares instead of filter fn
kennethloeffler 6b9e515
Update ignore_trees_removing test, accept snaphot
kennethloeffler 579f55c
Add remove_default_properties test
kennethloeffler b54eee1
Add comment explaining property map removals
kennethloeffler 6eb04bf
Rename function, refactor so it produces attribute and prop maps
kennethloeffler b57f473
Remove `true` branch for default props, since it is now unnecessary
kennethloeffler e335caa
Add doc comment for populate_unresolved_properties
kennethloeffler ea4af65
Remove outdated comment
kennethloeffler 09c4e2c
Fix project_node_should_reserialize
kennethloeffler 7cdda8a
Do class descriptor lookup only once
kennethloeffler ca488ac
Make old property pass more robust against unknowns, add comments
kennethloeffler 0d8a36d
Use iter instead of into_iter for json model prop buffer
kennethloeffler 583666a
Fix some typos
kennethloeffler cae0c9b
Move should_reserialize fn to snapshot_middleware module
kennethloeffler bcfdc0c
Test whether json model should reserialize
kennethloeffler a854e8a
Remove println
kennethloeffler 59d780c
Remove log::debugs
kennethloeffler 3dd6856
Remove == true
kennethloeffler a4f10c6
Test if meta files should reserialize
kennethloeffler b2fd639
Run tests
kennethloeffler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 0 additions & 1 deletion
1
.../syncback-test-snapshots/end_to_end__rojo_test__syncback_util__ignore_paths_removing.snap
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
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
4 changes: 2 additions & 2 deletions
4
.../syncback-test-snapshots/end_to_end__rojo_test__syncback_util__ignore_trees_removing.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| --- | ||
| source: tests/rojo_test/syncback_util.rs | ||
| assertion_line: 45 | ||
| expression: "visualize_fs_snapshot(&fs_snapshot, &output_path)" | ||
| --- | ||
| added_files: [] | ||
| added_dirs: [] | ||
| added_dirs: | ||
| - src | ||
| removed_files: [] | ||
| removed_dirs: [] |
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
...t/syncback-test-snapshots/end_to_end__rojo_test__syncback_util__remove_default_props.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| source: tests/rojo_test/syncback_util.rs | ||
| expression: "visualize_fs_snapshot(&fs_snapshot, &output_path)" | ||
| --- | ||
| added_files: | ||
| - AdjacentMetadataScript/AdjacentMetadataScript.meta.json | ||
| - AdjacentMetadataScript/AdjacentMetadataScript.server.lua | ||
| - DirectoryMetadataPart/Part/init.meta.json | ||
| - Part.model.json | ||
| - default.project.json | ||
| added_dirs: | ||
| - AdjacentMetadataScript | ||
| - DirectoryMetadataPart | ||
| - DirectoryMetadataPart/Part | ||
| removed_files: [] | ||
| removed_dirs: [] |
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
5 changes: 5 additions & 0 deletions
5
...sts/remove_default_props/expected/AdjacentMetadataScript/AdjacentMetadataScript.meta.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "properties": { | ||
| "Disabled": true | ||
| } | ||
| } |
Empty file.
6 changes: 6 additions & 0 deletions
6
...st/syncback-tests/remove_default_props/expected/DirectoryMetadataPart/Part/init.meta.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "properties": { | ||
| "Anchored": true | ||
| }, | ||
| "className": "Part" | ||
| } |
10 changes: 10 additions & 0 deletions
10
rojo-test/syncback-tests/remove_default_props/expected/Part.model.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "className": "Part", | ||
| "properties": { | ||
| "Size": [ | ||
| 1.0, | ||
| 2.0, | ||
| 3.0 | ||
| ] | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
rojo-test/syncback-tests/remove_default_props/expected/default.project.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "name": "remove_default_props", | ||
| "tree": { | ||
| "$className": "DataModel", | ||
| "ReplicatedStorage": { | ||
| "AdjacentMetadataScript": { | ||
| "$path": "AdjacentMetadataScript" | ||
| }, | ||
| "DirectoryMetadataPart": { | ||
| "$path": "DirectoryMetadataPart" | ||
| }, | ||
| "JsonModelPart": { | ||
| "$path": "Part.model.json" | ||
| }, | ||
| "ProjectFilePart": { | ||
| "$className": "Part", | ||
| "$properties": { | ||
| "Transparency": 1.0 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
...tests/remove_default_props/output/AdjacentMetadataScript/AdjacentMetadataScript.meta.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "properties": { | ||
| "Disabled": true, | ||
| "RunContext": "Client", | ||
| "Archivable": false | ||
| } | ||
| } |
Empty file.
8 changes: 8 additions & 0 deletions
8
...test/syncback-tests/remove_default_props/output/DirectoryMetadataPart/Part/init.meta.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "properties": { | ||
| "CanCollide": false, | ||
| "Massless": false, | ||
| "Anchored": true | ||
| }, | ||
| "className": "Part" | ||
| } |
12 changes: 12 additions & 0 deletions
12
rojo-test/syncback-tests/remove_default_props/output/Part.model.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "className": "Part", | ||
| "properties": { | ||
| "Size": [ | ||
| 1.0, | ||
| 2.0, | ||
| 3.0 | ||
| ], | ||
| "Anchored": true, | ||
| "Massless": true | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
rojo-test/syncback-tests/remove_default_props/output/default.project.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "name": "remove_default_props", | ||
| "tree": { | ||
| "$className": "DataModel", | ||
| "ReplicatedStorage": { | ||
| "AdjacentMetadataScript": { | ||
| "$path": "AdjacentMetadataScript" | ||
| }, | ||
| "DirectoryMetadataPart": { | ||
| "$path": "DirectoryMetadataPart" | ||
| }, | ||
| "JsonModelPart": { | ||
| "$path": "Part.model.json" | ||
| }, | ||
| "ProjectFilePart": { | ||
| "$className": "Part", | ||
| "$properties": { | ||
| "Size": [ | ||
| 1.0, | ||
| 2.0, | ||
| 3.0 | ||
| ], | ||
| "Transparency": 1.0, | ||
| "CanCollide": false | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.