Skip to content
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

Add a $paths field for folders #936

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Added experimental setting for Auto Connect in playtests ([#840])
* Improved settings UI ([#886])
* `Open Scripts Externally` option can now be changed while syncing ([#911])
* Folders can specify `$paths` rather than `$path` to combine multiple folders on the filesystem ([#936])
* Projects may now specify rules for syncing files as if they had a different file extension. ([#813])
This is specified via a new field on project files, `syncRules`:

Expand Down Expand Up @@ -87,6 +88,7 @@
[#903]: https://github.com/rojo-rbx/rojo/pull/903
[#911]: https://github.com/rojo-rbx/rojo/pull/911
[#915]: https://github.com/rojo-rbx/rojo/pull/915
[#936]: https://github.com/rojo-rbx/rojo/pull/936

## [7.4.1] - February 20, 2024
* Made the `name` field optional on project files ([#870])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
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: true
Name: multiple_paths
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: ModuleScript
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: eg1
Parent: id-2
Properties:
Source:
String: ""
id-4:
Children: []
ClassName: ModuleScript
Id: id-4
Metadata:
ignoreUnknownInstances: false
Name: eg2
Parent: id-2
Properties:
Source:
String: ""
messageCursor: 0
sessionId: id-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)

---
expectedPlaceIds: ~
gameId: ~
placeId: ~
projectName: multiple_paths
protocolVersion: 4
rootInstanceId: id-2
serverVersion: "[server-version]"
sessionId: id-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children:
- id-4
- id-5
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: multiple_paths
Parent: "00000000000000000000000000000000"
Properties: {}
id-4:
Children: []
ClassName: ModuleScript
Id: id-4
Metadata:
ignoreUnknownInstances: false
Name: eg2
Parent: id-2
Properties:
Source:
String: ""
id-5:
Children: []
ClassName: ModuleScript
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: eg11
Parent: id-2
Properties:
Source:
String: ""
messageCursor: 2
sessionId: id-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
source: tests/tests/serve.rs
expression: "subscribe_response.intern_and_redact(&mut redactions, ())"

---
messageCursor: 2
messages:
- added: {}
removed:
- id-3
updated: []
- added:
id-5:
Children: []
ClassName: ModuleScript
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: eg11
Parent: id-2
Properties:
Source:
String: ""
removed: []
updated: []
sessionId: id-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children:
- id-5
- id-6
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: multiple_paths
Parent: "00000000000000000000000000000000"
Properties: {}
id-5:
Children: []
ClassName: ModuleScript
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: eg11
Parent: id-2
Properties:
Source:
String: ""
id-6:
Children: []
ClassName: ModuleScript
Id: id-6
Metadata:
ignoreUnknownInstances: false
Name: eg22
Parent: id-2
Properties:
Source:
String: ""
messageCursor: 4
sessionId: id-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
source: tests/tests/serve.rs
expression: "subscribe_response.intern_and_redact(&mut redactions, ())"

---
messageCursor: 4
messages:
- added:
id-5:
Children: []
ClassName: ModuleScript
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: eg11
Parent: id-2
Properties:
Source:
String: ""
removed: []
updated: []
- added: {}
removed:
- id-4
updated: []
- added:
id-6:
Children: []
ClassName: ModuleScript
Id: id-6
Metadata:
ignoreUnknownInstances: false
Name: eg22
Parent: id-2
Properties:
Source:
String: ""
removed: []
updated: []
sessionId: id-1
9 changes: 9 additions & 0 deletions rojo-test/serve-tests/multiple_paths/default.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "multiple_paths",
"tree": {
"$paths": [
"src1",
"src2"
]
}
}
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ pub struct ProjectNode {
/// spreadsheets (`.csv`).
#[serde(rename = "$path", skip_serializing_if = "Option::is_none")]
pub path: Option<PathNode>,

#[serde(rename = "$paths", skip_serializing_if = "Option::is_none")]
pub paths: Option<Vec<PathNode>>,
}

impl ProjectNode {
Expand Down
Loading