-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
RunContext
support for script outputs (#765)
Resolves #667 This PR: - Introduces a new field in the project file: `scriptType` which has the default value of `Class` (in parity with previous versions), but can also be `RunContext`. - This is then passed to `InstanceContext` from the `Project` struct. - This then changes the RunContext in the lua `snapshot_middleware` --------- Co-authored-by: Micah <[email protected]>
- Loading branch information
1 parent
539cd0d
commit bb8dd14
Showing
56 changed files
with
602 additions
and
95 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
35 changes: 35 additions & 0 deletions
35
rojo-test/build-test-snapshots/end_to_end__tests__build__nested_runcontext.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,35 @@ | ||
--- | ||
source: tests/tests/build.rs | ||
expression: contents | ||
--- | ||
<roblox version="4"> | ||
<Item class="Folder" referent="0"> | ||
<Properties> | ||
<string name="Name">nested_runcontext</string> | ||
</Properties> | ||
<Item class="Folder" referent="1"> | ||
<Properties> | ||
<string name="Name">folder1</string> | ||
</Properties> | ||
<Item class="Script" referent="2"> | ||
<Properties> | ||
<string name="Name">test</string> | ||
<token name="RunContext">1</token> | ||
<string name="Source"></string> | ||
</Properties> | ||
</Item> | ||
</Item> | ||
<Item class="Folder" referent="3"> | ||
<Properties> | ||
<string name="Name">folder2</string> | ||
</Properties> | ||
<Item class="Script" referent="4"> | ||
<Properties> | ||
<string name="Name">test</string> | ||
<token name="RunContext">0</token> | ||
<string name="Source"></string> | ||
</Properties> | ||
</Item> | ||
</Item> | ||
</Item> | ||
</roblox> |
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
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
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
13 changes: 13 additions & 0 deletions
13
rojo-test/build-tests/nested_runcontext/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,13 @@ | ||
{ | ||
"name": "nested_runcontext", | ||
"emitLegacyScripts": false, | ||
"tree": { | ||
"$className": "Folder", | ||
"folder1": { | ||
"$path": "folder1" | ||
}, | ||
"folder2": { | ||
"$path": "folder2" | ||
} | ||
} | ||
} |
Empty file.
7 changes: 7 additions & 0 deletions
7
rojo-test/build-tests/nested_runcontext/folder2/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,7 @@ | ||
{ | ||
"name": "nested_runcontext", | ||
"emitLegacyScripts": true, | ||
"tree": { | ||
"$path": "folder3" | ||
} | ||
} |
Empty file.
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
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
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
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
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
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
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
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
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
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.