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

Protect against syncing and building the wrong project types #772

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* Added support for `Terrain.MaterialColors` ([#770])
* Allow `Terrain` to be specified without a classname ([#771])
* Add Confirmation Behavior setting ([#774])
* Projects can no longer be built with the wrong file extension ([#772])
* Projects can no longer be served if they don't have a DataModel root ([#722])

[#761]: https://github.com/rojo-rbx/rojo/pull/761
[#745]: https://github.com/rojo-rbx/rojo/pull/745
Expand Down Expand Up @@ -55,6 +57,7 @@
[#760]: https://github.com/rojo-rbx/rojo/pull/760
[#770]: https://github.com/rojo-rbx/rojo/pull/770
[#771]: https://github.com/rojo-rbx/rojo/pull/771
[#772]: https://github.com/rojo-rbx/rojo/pull/772
[#774]: https://github.com/rojo-rbx/rojo/pull/774

## [7.3.0] - April 22, 2023
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,21 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="DataModel" referent="0">
<Item class="HttpService" referent="0">
<Properties>
<string name="Name">infer-service-name</string>
<string name="Name">HttpService</string>
<bool name="HttpEnabled">true</bool>
</Properties>
<Item class="HttpService" referent="1">
<Properties>
<string name="Name">HttpService</string>
<bool name="HttpEnabled">true</bool>
</Properties>
</Item>
<Item class="ReplicatedStorage" referent="2">
</Item>
<Item class="ReplicatedStorage" referent="1">
<Properties>
<string name="Name">ReplicatedStorage</string>
</Properties>
<Item class="ModuleScript" referent="2">
<Properties>
<string name="Name">ReplicatedStorage</string>
<string name="Name">Main</string>
<string name="Source">-- hello, from main</string>
</Properties>
<Item class="ModuleScript" referent="3">
<Properties>
<string name="Name">Main</string>
<string name="Source">-- hello, from main</string>
</Properties>
</Item>
</Item>
</Item>
</roblox>
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="DataModel" referent="0">
<Item class="StarterPlayer" referent="0">
<Properties>
<string name="Name">infer-service-name</string>
<string name="Name">StarterPlayer</string>
</Properties>
<Item class="StarterPlayer" referent="1">
<Item class="StarterCharacterScripts" referent="1">
<Properties>
<string name="Name">StarterPlayer</string>
<string name="Name">StarterCharacterScripts</string>
</Properties>
</Item>
<Item class="StarterPlayerScripts" referent="2">
<Properties>
<string name="Name">StarterPlayerScripts</string>
</Properties>
<Item class="StarterCharacterScripts" referent="2">
<Properties>
<string name="Name">StarterCharacterScripts</string>
</Properties>
</Item>
<Item class="StarterPlayerScripts" referent="3">
<Properties>
<string name="Name">StarterPlayerScripts</string>
</Properties>
</Item>
</Item>
</Item>
</roblox>
Original file line number Diff line number Diff line change
@@ -1,66 +1,60 @@
---
source: tests/tests/build.rs
expression: contents

---
<roblox version="4">
<Item class="DataModel" referent="0">
<Item class="Lighting" referent="0">
<Properties>
<string name="Name">unresolved-values</string>
<string name="Name">Lighting</string>
<Color3 name="Ambient">
<R>1</R>
<G>0</G>
<B>0</B>
</Color3>
<token name="Technology">1</token>
</Properties>
<Item class="Lighting" referent="1">
</Item>
<Item class="Workspace" referent="1">
<Properties>
<string name="Name">Workspace</string>
</Properties>
<Item class="BoolValue" referent="2">
<Properties>
<string name="Name">Bool</string>
<bool name="Value">true</bool>
</Properties>
</Item>
<Item class="Part" referent="3">
<Properties>
<string name="Name">Color</string>
<CoordinateFrame name="CFrame">
<X>1</X>
<Y>2</Y>
<Z>3</Z>
<R00>0</R00>
<R01>1</R01>
<R02>0</R02>
<R10>0</R10>
<R11>0</R11>
<R12>1</R12>
<R20>1</R20>
<R21>0</R21>
<R22>0</R22>
</CoordinateFrame>
<Color3uint8 name="Color3uint8">8404992</Color3uint8>
</Properties>
</Item>
<Item class="NumberValue" referent="4">
<Properties>
<string name="Name">Lighting</string>
<Color3 name="Ambient">
<R>1</R>
<G>0</G>
<B>0</B>
</Color3>
<token name="Technology">1</token>
<string name="Name">Float</string>
<double name="Value">123.5</double>
</Properties>
</Item>
<Item class="Workspace" referent="2">
<Item class="IntValue" referent="5">
<Properties>
<string name="Name">Workspace</string>
<string name="Name">Int</string>
<int64 name="Value">65</int64>
</Properties>
<Item class="BoolValue" referent="3">
<Properties>
<string name="Name">Bool</string>
<bool name="Value">true</bool>
</Properties>
</Item>
<Item class="Part" referent="4">
<Properties>
<string name="Name">Color</string>
<CoordinateFrame name="CFrame">
<X>1</X>
<Y>2</Y>
<Z>3</Z>
<R00>0</R00>
<R01>1</R01>
<R02>0</R02>
<R10>0</R10>
<R11>0</R11>
<R12>1</R12>
<R20>1</R20>
<R21>0</R21>
<R22>0</R22>
</CoordinateFrame>
<Color3uint8 name="Color3uint8">8404992</Color3uint8>
</Properties>
</Item>
<Item class="NumberValue" referent="5">
<Properties>
<string name="Name">Float</string>
<double name="Value">123.5</double>
</Properties>
</Item>
<Item class="IntValue" referent="6">
<Properties>
<string name="Name">Int</string>
<int64 name="Value">65</int64>
</Properties>
</Item>
</Item>
</Item>
</roblox>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ instances:
id-2:
Children:
- id-3
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand All @@ -24,3 +24,4 @@ instances:
Properties: {}
messageCursor: 1
sessionId: id-1

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
instances:
id-2:
Children: []
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand All @@ -14,3 +14,4 @@ instances:
Properties: {}
messageCursor: 0
sessionId: id-1

Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children:
- id-3
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: edit_init
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: ModuleScript
Id: id-2
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: edit_init
Parent: "00000000000000000000000000000000"
Parent: id-2
Properties:
Source:
String: "-- Edited contents"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children:
- id-3
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: edit_init
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: ModuleScript
Id: id-2
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: edit_init
Parent: "00000000000000000000000000000000"
Parent: id-2
Properties:
Source:
String: "-- Original contents"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
source: tests/tests/serve.rs
expression: "subscribe_response.intern_and_redact(&mut redactions, ())"

---
messageCursor: 1
messages:
Expand All @@ -14,6 +13,6 @@ messages:
changedProperties:
Source:
String: "-- Edited contents"
id: id-2
id: id-3
sessionId: id-1

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
instances:
id-2:
Children: []
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: true
ignoreUnknownInstances: false
Name: empty
Parent: "00000000000000000000000000000000"
Properties: {}
messageCursor: 0
sessionId: id-1

Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children:
- id-3
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-2:
Children: []
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"

---
instances:
id-10:
Expand Down Expand Up @@ -51,7 +50,7 @@ instances:
id-2:
Children:
- id-3
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
instances:
id-2:
Children: []
ClassName: Folder
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Expand All @@ -14,3 +14,4 @@ instances:
Properties: {}
messageCursor: 0
sessionId: id-1

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
source: tests/tests/serve.rs
expression: "subscribe_response.intern_and_redact(&mut redactions, ())"

---
messageCursor: 1
messages:
Expand Down
Loading