forked from rojo-rbx/rojo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the
name
field in projects optional (rojo-rbx#870)
Closes rojo-rbx#858. If a project is named `default.project.json`, it acts as an `init` file and gains the name of the folder it's inside of. If it is named something other than `default.project.json`, it gains the name of the file with `.project.json` trimmed off. So e.g. `foo.project.json` becomes `foo`.
- Loading branch information
Showing
27 changed files
with
486 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
22 changes: 22 additions & 0 deletions
22
rojo-test/build-test-snapshots/end_to_end__tests__build__no_name_default_project.snap
This file contains 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,22 @@ | ||
--- | ||
source: tests/tests/build.rs | ||
expression: contents | ||
--- | ||
<roblox version="4"> | ||
<Item class="Folder" referent="0"> | ||
<Properties> | ||
<string name="Name">top-level</string> | ||
</Properties> | ||
<Item class="Folder" referent="1"> | ||
<Properties> | ||
<string name="Name">second-level</string> | ||
</Properties> | ||
<Item class="IntValue" referent="2"> | ||
<Properties> | ||
<string name="Name">third-level</string> | ||
<int64 name="Value">1337</int64> | ||
</Properties> | ||
</Item> | ||
</Item> | ||
</Item> | ||
</roblox> |
22 changes: 22 additions & 0 deletions
22
rojo-test/build-test-snapshots/end_to_end__tests__build__no_name_project.snap
This file contains 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,22 @@ | ||
--- | ||
source: tests/tests/build.rs | ||
expression: contents | ||
--- | ||
<roblox version="4"> | ||
<Item class="Folder" referent="0"> | ||
<Properties> | ||
<string name="Name">no_name_project</string> | ||
</Properties> | ||
<Item class="Folder" referent="1"> | ||
<Properties> | ||
<string name="Name">second-level</string> | ||
</Properties> | ||
<Item class="BoolValue" referent="2"> | ||
<Properties> | ||
<string name="Name">bool_value</string> | ||
<bool name="Value">true</bool> | ||
</Properties> | ||
</Item> | ||
</Item> | ||
</Item> | ||
</roblox> |
13 changes: 13 additions & 0 deletions
13
rojo-test/build-test-snapshots/end_to_end__tests__build__no_name_top_level_project.snap
This file contains 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,13 @@ | ||
--- | ||
source: tests/tests/build.rs | ||
assertion_line: 107 | ||
expression: contents | ||
--- | ||
<roblox version="4"> | ||
<Item class="StringValue" referent="0"> | ||
<Properties> | ||
<string name="Name">no_name_top_level_project</string> | ||
<string name="Value">If this isn't named `no_name_top_level_project`, something went wrong!</string> | ||
</Properties> | ||
</Item> | ||
</roblox> |
9 changes: 9 additions & 0 deletions
9
rojo-test/build-tests/no_name_default_project/default.project.json
This file contains 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,9 @@ | ||
{ | ||
"name": "top-level", | ||
"tree": { | ||
"$className": "Folder", | ||
"second-level": { | ||
"$path": "src" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/build-tests/no_name_default_project/src/third-level/default.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "IntValue", | ||
"$properties": { | ||
"Value": 1337 | ||
} | ||
} | ||
} |
This file contains 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,9 @@ | ||
{ | ||
"name": "no_name_project", | ||
"tree": { | ||
"$className": "Folder", | ||
"second-level": { | ||
"$path": "src" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/build-tests/no_name_project/src/bool_value.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "BoolValue", | ||
"$properties": { | ||
"Value": true | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/build-tests/no_name_top_level_project/default.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "StringValue", | ||
"$properties": { | ||
"Value": "If this isn't named `no_name_top_level_project`, something went wrong!" | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_default_project_all.snap
This file contains 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,39 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
expression: "read_response.intern_and_redact(&mut redactions, root_id)" | ||
--- | ||
instances: | ||
id-2: | ||
Children: | ||
- id-3 | ||
ClassName: Folder | ||
Id: id-2 | ||
Metadata: | ||
ignoreUnknownInstances: true | ||
Name: top-level | ||
Parent: "00000000000000000000000000000000" | ||
Properties: {} | ||
id-3: | ||
Children: | ||
- id-4 | ||
ClassName: Folder | ||
Id: id-3 | ||
Metadata: | ||
ignoreUnknownInstances: false | ||
Name: second-level | ||
Parent: id-2 | ||
Properties: {} | ||
id-4: | ||
Children: [] | ||
ClassName: IntValue | ||
Id: id-4 | ||
Metadata: | ||
ignoreUnknownInstances: true | ||
Name: third-level | ||
Parent: id-3 | ||
Properties: | ||
Value: | ||
Int64: 1337 | ||
messageCursor: 0 | ||
sessionId: id-1 | ||
|
14 changes: 14 additions & 0 deletions
14
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_default_project_info.snap
This file contains 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,14 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
assertion_line: 316 | ||
expression: redactions.redacted_yaml(info) | ||
--- | ||
expectedPlaceIds: ~ | ||
gameId: ~ | ||
placeId: ~ | ||
projectName: top-level | ||
protocolVersion: 4 | ||
rootInstanceId: id-2 | ||
serverVersion: "[server-version]" | ||
sessionId: id-1 | ||
|
40 changes: 40 additions & 0 deletions
40
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_project_all.snap
This file contains 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,40 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
assertion_line: 338 | ||
expression: "read_response.intern_and_redact(&mut redactions, root_id)" | ||
--- | ||
instances: | ||
id-2: | ||
Children: | ||
- id-3 | ||
ClassName: Folder | ||
Id: id-2 | ||
Metadata: | ||
ignoreUnknownInstances: true | ||
Name: no_name_project | ||
Parent: "00000000000000000000000000000000" | ||
Properties: {} | ||
id-3: | ||
Children: | ||
- id-4 | ||
ClassName: Folder | ||
Id: id-3 | ||
Metadata: | ||
ignoreUnknownInstances: false | ||
Name: second-level | ||
Parent: id-2 | ||
Properties: {} | ||
id-4: | ||
Children: [] | ||
ClassName: BoolValue | ||
Id: id-4 | ||
Metadata: | ||
ignoreUnknownInstances: true | ||
Name: bool_value | ||
Parent: id-3 | ||
Properties: | ||
Value: | ||
Bool: true | ||
messageCursor: 0 | ||
sessionId: id-1 | ||
|
14 changes: 14 additions & 0 deletions
14
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_project_info.snap
This file contains 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,14 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
assertion_line: 335 | ||
expression: redactions.redacted_yaml(info) | ||
--- | ||
expectedPlaceIds: ~ | ||
gameId: ~ | ||
placeId: ~ | ||
projectName: no_name_project | ||
protocolVersion: 4 | ||
rootInstanceId: id-2 | ||
serverVersion: "[server-version]" | ||
sessionId: id-1 | ||
|
20 changes: 20 additions & 0 deletions
20
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_top_level_project_all.snap
This file contains 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,20 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
assertion_line: 357 | ||
expression: "read_response.intern_and_redact(&mut redactions, root_id)" | ||
--- | ||
instances: | ||
id-2: | ||
Children: [] | ||
ClassName: StringValue | ||
Id: id-2 | ||
Metadata: | ||
ignoreUnknownInstances: true | ||
Name: no_name_top_level_project | ||
Parent: "00000000000000000000000000000000" | ||
Properties: | ||
Value: | ||
String: "If this isn't named `no_name_top_level_project`, something went wrong!" | ||
messageCursor: 0 | ||
sessionId: id-1 | ||
|
14 changes: 14 additions & 0 deletions
14
rojo-test/serve-test-snapshots/end_to_end__tests__serve__no_name_top_level_project_info.snap
This file contains 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,14 @@ | ||
--- | ||
source: tests/tests/serve.rs | ||
assertion_line: 351 | ||
expression: redactions.redacted_yaml(info) | ||
--- | ||
expectedPlaceIds: ~ | ||
gameId: ~ | ||
placeId: ~ | ||
projectName: no_name_top_level_project | ||
protocolVersion: 4 | ||
rootInstanceId: id-2 | ||
serverVersion: "[server-version]" | ||
sessionId: id-1 | ||
|
9 changes: 9 additions & 0 deletions
9
rojo-test/serve-tests/no_name_default_project/default.project.json
This file contains 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,9 @@ | ||
{ | ||
"name": "top-level", | ||
"tree": { | ||
"$className": "Folder", | ||
"second-level": { | ||
"$path": "src" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/serve-tests/no_name_default_project/src/third-level/default.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "IntValue", | ||
"$properties": { | ||
"Value": 1337 | ||
} | ||
} | ||
} |
This file contains 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,9 @@ | ||
{ | ||
"name": "no_name_project", | ||
"tree": { | ||
"$className": "Folder", | ||
"second-level": { | ||
"$path": "src" | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/serve-tests/no_name_project/src/bool_value.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "BoolValue", | ||
"$properties": { | ||
"Value": true | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
rojo-test/serve-tests/no_name_top_level_project/default.project.json
This file contains 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 @@ | ||
{ | ||
"tree": { | ||
"$className": "StringValue", | ||
"$properties": { | ||
"Value": "If this isn't named `no_name_top_level_project`, something went wrong!" | ||
} | ||
} | ||
} |
This file contains 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.