From e864cf0c7df50bceb491ad7f3fcb1ea381201749 Mon Sep 17 00:00:00 2001 From: boatbomber Date: Wed, 3 Aug 2022 15:36:58 -0700 Subject: [PATCH] Switch git submodules to Wally packages (#584) * Switch git submodules to Wally packages * Update build snapshot * Add wally to foreman and use latest versions * Install packages in CI runners * Fix indents * Install packages in the correct directory * Install packages in correct dir of release action too * Remove submodules from ci checkout * Remove submodules from release checkout * Update selene with latest fix * Fix whitespace Co-authored-by: Lucien Greathouse --- .github/workflows/ci.yml | 28 ++++++++-- .github/workflows/release.yml | 10 ++-- .gitignore | 3 + .gitmodules | 15 ----- build.rs | 17 +----- foreman.toml | 5 +- plugin/default.project.json | 56 ++++++++----------- plugin/modules/flipper | 1 - plugin/modules/promise | 1 - plugin/modules/roact | 1 - plugin/modules/t | 1 - plugin/modules/testez | 1 - plugin/run-tests.server.lua | 4 +- plugin/src/ApiContext.lua | 11 ++-- .../src/App/Components/BorderedContainer.lua | 5 +- plugin/src/App/Components/Checkbox.lua | 7 ++- plugin/src/App/Components/Header.lua | 5 +- plugin/src/App/Components/IconButton.lua | 7 ++- plugin/src/App/Components/ScrollingFrame.lua | 5 +- plugin/src/App/Components/SlicedImage.lua | 5 +- plugin/src/App/Components/Spinner.lua | 5 +- .../Components/Studio/StudioPluginAction.lua | 3 +- .../Components/Studio/StudioPluginContext.lua | 5 +- .../App/Components/Studio/StudioPluginGui.lua | 5 +- .../Components/Studio/StudioToggleButton.lua | 3 +- .../App/Components/Studio/StudioToolbar.lua | 5 +- .../Studio/StudioToolbarContext.lua | 5 +- plugin/src/App/Components/TextButton.lua | 7 ++- plugin/src/App/Components/TouchRipple.lua | 7 ++- plugin/src/App/Notifications.lua | 5 +- plugin/src/App/Page.lua | 7 ++- plugin/src/App/StatusPages/Connected.lua | 5 +- plugin/src/App/StatusPages/Connecting.lua | 5 +- plugin/src/App/StatusPages/Error.lua | 5 +- plugin/src/App/StatusPages/NotConnected.lua | 5 +- .../src/App/StatusPages/Settings/Setting.lua | 3 +- plugin/src/App/StatusPages/Settings/init.lua | 3 +- plugin/src/App/Theme.lua | 5 +- plugin/src/App/bindingUtil.lua | 7 ++- plugin/src/App/init.lua | 5 +- plugin/src/ChangeBatcher/createPatchSet.lua | 3 +- .../src/ChangeBatcher/encodePatchUpdate.lua | 5 +- plugin/src/ChangeBatcher/encodeProperty.lua | 5 +- plugin/src/InstanceMap.lua | 3 +- plugin/src/PatchSet.lua | 5 +- plugin/src/Reconciler/Error.lua | 5 +- plugin/src/Reconciler/applyPatch.lua | 3 +- plugin/src/Reconciler/decodeValue.lua | 5 +- plugin/src/Reconciler/diff.lua | 6 +- plugin/src/Reconciler/diff.spec.lua | 5 +- plugin/src/Reconciler/getProperty.lua | 5 +- plugin/src/Reconciler/setProperty.lua | 7 ++- plugin/src/ServeSession.lua | 7 ++- plugin/src/Settings.lua | 3 +- plugin/src/Types.lua | 4 +- plugin/src/init.server.lua | 13 +++-- plugin/src/invariant.lua | 6 +- plugin/src/preloadAssets.lua | 5 +- plugin/src/runTests.lua | 5 +- plugin/src/soundPlayer.lua | 19 ++++--- plugin/test-place.project.json | 4 +- plugin/wally.lock | 33 +++++++++++ plugin/wally.toml | 17 ++++++ 63 files changed, 271 insertions(+), 190 deletions(-) delete mode 100644 .gitmodules delete mode 160000 plugin/modules/flipper delete mode 160000 plugin/modules/promise delete mode 160000 plugin/modules/roact delete mode 160000 plugin/modules/t delete mode 160000 plugin/modules/testez create mode 100644 plugin/wally.lock create mode 100644 plugin/wally.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab5ffe20..6f4b3c56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,6 @@ jobs: steps: - uses: actions/checkout@v3 - with: - submodules: true - name: Install Rust uses: actions-rs/toolchain@v1 @@ -30,6 +28,17 @@ jobs: override: true profile: minimal + - name: Setup Foreman + uses: Roblox/setup-foreman@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install packages + run: | + cd plugin + wally install + cd .. + - name: Build run: cargo build --locked --verbose @@ -42,8 +51,6 @@ jobs: steps: - uses: actions/checkout@v3 - with: - submodules: true - name: Install Rust uses: actions-rs/toolchain@v1 @@ -52,8 +59,19 @@ jobs: override: true components: rustfmt, clippy + - name: Setup Foreman + uses: Roblox/setup-foreman@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install packages + run: | + cd plugin + wally install + cd .. + - name: Rustfmt run: cargo fmt -- --check - name: Clippy - run: cargo clippy \ No newline at end of file + run: cargo clippy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 216d8cad..251b3140 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,14 +28,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - submodules: true - name: Setup Foreman uses: Roblox/setup-foreman@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + - name: Install packages + run: | + cd plugin + wally install + cd .. + - name: Build Plugin run: rojo build plugin --output Rojo.rbxm @@ -92,8 +96,6 @@ jobs: BIN: rojo steps: - uses: actions/checkout@v3 - with: - submodules: true - name: Get Version from Tag shell: bash diff --git a/.gitignore b/.gitignore index 88cdf551..2c910135 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ # Test places for the Roblox Studio Plugin /plugin/*.rbxlx +# Packages for the Roblox Studio Plugin +/plugin/*Packages + # Roblox Studio holds 'lock' files on places *.rbxl.lock *.rbxlx.lock diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 98b1cb5e..00000000 --- a/.gitmodules +++ /dev/null @@ -1,15 +0,0 @@ -[submodule "plugin/modules/roact"] - path = plugin/modules/roact - url = https://github.com/Roblox/roact.git -[submodule "plugin/modules/testez"] - path = plugin/modules/testez - url = https://github.com/Roblox/testez.git -[submodule "plugin/modules/promise"] - path = plugin/modules/promise - url = https://github.com/LPGhatguy/roblox-lua-promise.git -[submodule "plugin/modules/t"] - path = plugin/modules/t - url = https://github.com/osyrisrblx/t.git -[submodule "plugin/modules/flipper"] - path = plugin/modules/flipper - url = https://github.com/Reselim/Flipper diff --git a/build.rs b/build.rs index 0cbd190f..1cff84c5 100644 --- a/build.rs +++ b/build.rs @@ -43,8 +43,6 @@ fn main() -> Result<(), anyhow::Error> { let root_dir = env::var_os("CARGO_MANIFEST_DIR").unwrap(); let plugin_root = PathBuf::from(root_dir).join("plugin"); - let plugin_modules = plugin_root.join("modules"); - let snapshot = VfsSnapshot::dir(hashmap! { "default.project.json" => snapshot_from_fs_path(&plugin_root.join("default.project.json"))?, "fmt" => snapshot_from_fs_path(&plugin_root.join("fmt"))?, @@ -52,20 +50,7 @@ fn main() -> Result<(), anyhow::Error> { "log" => snapshot_from_fs_path(&plugin_root.join("log"))?, "rbx_dom_lua" => snapshot_from_fs_path(&plugin_root.join("rbx_dom_lua"))?, "src" => snapshot_from_fs_path(&plugin_root.join("src"))?, - "modules" => VfsSnapshot::dir(hashmap! { - "roact" => VfsSnapshot::dir(hashmap! { - "src" => snapshot_from_fs_path(&plugin_modules.join("roact").join("src"))? - }), - "promise" => VfsSnapshot::dir(hashmap! { - "lib" => snapshot_from_fs_path(&plugin_modules.join("promise").join("lib"))? - }), - "t" => VfsSnapshot::dir(hashmap! { - "lib" => snapshot_from_fs_path(&plugin_modules.join("t").join("lib"))? - }), - "flipper" => VfsSnapshot::dir(hashmap! { - "src" => snapshot_from_fs_path(&plugin_modules.join("flipper").join("src"))? - }), - }), + "Packages" => snapshot_from_fs_path(&plugin_root.join("Packages"))?, }); let out_path = Path::new(&out_dir).join("plugin.bincode"); diff --git a/foreman.toml b/foreman.toml index 20ce14cb..4b8546aa 100644 --- a/foreman.toml +++ b/foreman.toml @@ -1,4 +1,5 @@ [tools] -rojo = { source = "rojo-rbx/rojo", version = "7.1.1" } +rojo = { source = "rojo-rbx/rojo", version = "7.2.1" } run-in-roblox = { source = "rojo-rbx/run-in-roblox", version = "0.3.0" } -selene = { source = "Kampfkarren/selene", version = "0.18.2" } +selene = { source = "Kampfkarren/selene", version = "0.20.0" } +wally = { source = "UpliftGames/wally", version = "0.3.1"} diff --git a/plugin/default.project.json b/plugin/default.project.json index bdaadab3..09234438 100644 --- a/plugin/default.project.json +++ b/plugin/default.project.json @@ -1,33 +1,25 @@ { - "name": "Rojo", - "tree": { - "$className": "Folder", - "Plugin": { - "$path": "src" - }, - "Log": { - "$path": "log" - }, - "Http": { - "$path": "http" - }, - "Fmt": { - "$path": "fmt" - }, - "RbxDom": { - "$path": "rbx_dom_lua" - }, - "Roact": { - "$path": "modules/roact/src" - }, - "Promise": { - "$path": "modules/promise/lib" - }, - "t": { - "$path": "modules/t/lib" - }, - "Flipper": { - "$path": "modules/flipper/src" - } - } -} \ No newline at end of file + "name": "Rojo", + "tree": { + "$className": "Folder", + "Plugin": { + "$path": "src" + }, + "Packages": { + "$path": "Packages", + + "Log": { + "$path": "log" + }, + "Http": { + "$path": "http" + }, + "Fmt": { + "$path": "fmt" + }, + "RbxDom": { + "$path": "rbx_dom_lua" + } + } + } +} diff --git a/plugin/modules/flipper b/plugin/modules/flipper deleted file mode 160000 index 4cf7a03c..00000000 --- a/plugin/modules/flipper +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4cf7a03cb6776ec0af41b6a50988aa70e5c9cc3c diff --git a/plugin/modules/promise b/plugin/modules/promise deleted file mode 160000 index 7fb09d10..00000000 --- a/plugin/modules/promise +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7fb09d103f4a680cbd61d5348ec9c5d50244a8e0 diff --git a/plugin/modules/roact b/plugin/modules/roact deleted file mode 160000 index f7d2f1ce..00000000 --- a/plugin/modules/roact +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7d2f1ce1dd69120f457c2f8032bb184eb8f0c29 diff --git a/plugin/modules/t b/plugin/modules/t deleted file mode 160000 index f643b506..00000000 --- a/plugin/modules/t +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f643b50682c24ec8d6ac3e11f41ee8cbbb2bcecb diff --git a/plugin/modules/testez b/plugin/modules/testez deleted file mode 160000 index 25d957d4..00000000 --- a/plugin/modules/testez +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 25d957d4d5c4c02a52843ef43e72f21f973c2908 diff --git a/plugin/run-tests.server.lua b/plugin/run-tests.server.lua index a9ebcdf6..7637d12f 100644 --- a/plugin/run-tests.server.lua +++ b/plugin/run-tests.server.lua @@ -1,6 +1,6 @@ local ReplicatedStorage = game:GetService("ReplicatedStorage") -local TestEZ = require(ReplicatedStorage.TestEZ) +local TestEZ = require(ReplicatedStorage.Packages.TestEZ) local Rojo = ReplicatedStorage.Rojo @@ -16,4 +16,4 @@ require(Rojo.Plugin.runTests)(TestEZ) if setDevSettings then DevSettings:resetValues() -end \ No newline at end of file +end diff --git a/plugin/src/ApiContext.lua b/plugin/src/ApiContext.lua index 40af8058..78f54fed 100644 --- a/plugin/src/ApiContext.lua +++ b/plugin/src/ApiContext.lua @@ -1,6 +1,7 @@ -local Http = require(script.Parent.Parent.Http) -local Log = require(script.Parent.Parent.Log) -local Promise = require(script.Parent.Parent.Promise) +local Packages = script.Parent.Parent.Packages +local Http = require(Packages.Http) +local Log = require(Packages.Log) +local Promise = require(Packages.Promise) local Config = require(script.Parent.Config) local Types = require(script.Parent.Types) @@ -85,7 +86,7 @@ local ApiContext = {} ApiContext.__index = ApiContext function ApiContext.new(baseUrl) - assert(type(baseUrl) == "string") + assert(type(baseUrl) == "string", "baseUrl must be a string") local self = { __baseUrl = baseUrl, @@ -248,4 +249,4 @@ function ApiContext:open(id) end) end -return ApiContext \ No newline at end of file +return ApiContext diff --git a/plugin/src/App/Components/BorderedContainer.lua b/plugin/src/App/Components/BorderedContainer.lua index 78ceb426..73fd2bf1 100644 --- a/plugin/src/App/Components/BorderedContainer.lua +++ b/plugin/src/App/Components/BorderedContainer.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Theme = require(Plugin.App.Theme) local Assets = require(Plugin.Assets) @@ -38,4 +39,4 @@ local function BorderedContainer(props) end) end -return BorderedContainer \ No newline at end of file +return BorderedContainer diff --git a/plugin/src/App/Components/Checkbox.lua b/plugin/src/App/Components/Checkbox.lua index 21c2c544..631164ee 100644 --- a/plugin/src/App/Components/Checkbox.lua +++ b/plugin/src/App/Components/Checkbox.lua @@ -1,8 +1,9 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local Assets = require(Plugin.Assets) local Theme = require(Plugin.App.Theme) @@ -93,4 +94,4 @@ function Checkbox:render() end) end -return Checkbox \ No newline at end of file +return Checkbox diff --git a/plugin/src/App/Components/Header.lua b/plugin/src/App/Components/Header.lua index fdc5e5d1..ca6acecf 100644 --- a/plugin/src/App/Components/Header.lua +++ b/plugin/src/App/Components/Header.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Theme = require(Plugin.App.Theme) local Assets = require(Plugin.Assets) @@ -52,4 +53,4 @@ local function Header(props) end) end -return Header \ No newline at end of file +return Header diff --git a/plugin/src/App/Components/IconButton.lua b/plugin/src/App/Components/IconButton.lua index 388a1fe0..18e914a6 100644 --- a/plugin/src/App/Components/IconButton.lua +++ b/plugin/src/App/Components/IconButton.lua @@ -1,8 +1,9 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local Assets = require(Plugin.Assets) local bindingUtil = require(Plugin.App.bindingUtil) @@ -76,4 +77,4 @@ function IconButton:render() }) end -return IconButton \ No newline at end of file +return IconButton diff --git a/plugin/src/App/Components/ScrollingFrame.lua b/plugin/src/App/Components/ScrollingFrame.lua index 87d10226..2231aacb 100644 --- a/plugin/src/App/Components/ScrollingFrame.lua +++ b/plugin/src/App/Components/ScrollingFrame.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Assets = require(Plugin.Assets) local Theme = require(Plugin.App.Theme) @@ -39,4 +40,4 @@ local function ScrollingFrame(props) end) end -return ScrollingFrame \ No newline at end of file +return ScrollingFrame diff --git a/plugin/src/App/Components/SlicedImage.lua b/plugin/src/App/Components/SlicedImage.lua index 8c03c877..40279cc8 100644 --- a/plugin/src/App/Components/SlicedImage.lua +++ b/plugin/src/App/Components/SlicedImage.lua @@ -1,6 +1,7 @@ local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local e = Roact.createElement @@ -26,4 +27,4 @@ local function SlicedImage(props) }, props[Roact.Children]) end -return SlicedImage \ No newline at end of file +return SlicedImage diff --git a/plugin/src/App/Components/Spinner.lua b/plugin/src/App/Components/Spinner.lua index 562bd679..f09ea776 100644 --- a/plugin/src/App/Components/Spinner.lua +++ b/plugin/src/App/Components/Spinner.lua @@ -2,8 +2,9 @@ local RunService = game:GetService("RunService") local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Theme = require(Plugin.App.Theme) local Assets = require(Plugin.Assets) @@ -63,4 +64,4 @@ function Spinner:willUnmount() self.stepper:Disconnect() end -return Spinner \ No newline at end of file +return Spinner diff --git a/plugin/src/App/Components/Studio/StudioPluginAction.lua b/plugin/src/App/Components/Studio/StudioPluginAction.lua index 458bd4fc..3738d779 100644 --- a/plugin/src/App/Components/Studio/StudioPluginAction.lua +++ b/plugin/src/App/Components/Studio/StudioPluginAction.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Dictionary = require(Plugin.Dictionary) diff --git a/plugin/src/App/Components/Studio/StudioPluginContext.lua b/plugin/src/App/Components/Studio/StudioPluginContext.lua index 978f628f..a04f59d8 100644 --- a/plugin/src/App/Components/Studio/StudioPluginContext.lua +++ b/plugin/src/App/Components/Studio/StudioPluginContext.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local StudioPluginContext = Roact.createContext(nil) -return StudioPluginContext \ No newline at end of file +return StudioPluginContext diff --git a/plugin/src/App/Components/Studio/StudioPluginGui.lua b/plugin/src/App/Components/Studio/StudioPluginGui.lua index 6bd37511..e078572b 100644 --- a/plugin/src/App/Components/Studio/StudioPluginGui.lua +++ b/plugin/src/App/Components/Studio/StudioPluginGui.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Dictionary = require(Plugin.Dictionary) @@ -81,4 +82,4 @@ local function StudioPluginGuiWrapper(props) }) end -return StudioPluginGuiWrapper \ No newline at end of file +return StudioPluginGuiWrapper diff --git a/plugin/src/App/Components/Studio/StudioToggleButton.lua b/plugin/src/App/Components/Studio/StudioToggleButton.lua index 1adde586..8c7ed59e 100644 --- a/plugin/src/App/Components/Studio/StudioToggleButton.lua +++ b/plugin/src/App/Components/Studio/StudioToggleButton.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Dictionary = require(Plugin.Dictionary) diff --git a/plugin/src/App/Components/Studio/StudioToolbar.lua b/plugin/src/App/Components/Studio/StudioToolbar.lua index c03b20c0..34fd7aa0 100644 --- a/plugin/src/App/Components/Studio/StudioToolbar.lua +++ b/plugin/src/App/Components/Studio/StudioToolbar.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Dictionary = require(Plugin.Dictionary) @@ -42,4 +43,4 @@ local function StudioToolbarWrapper(props) }) end -return StudioToolbarWrapper \ No newline at end of file +return StudioToolbarWrapper diff --git a/plugin/src/App/Components/Studio/StudioToolbarContext.lua b/plugin/src/App/Components/Studio/StudioToolbarContext.lua index 925b7e0c..4dcba1dd 100644 --- a/plugin/src/App/Components/Studio/StudioToolbarContext.lua +++ b/plugin/src/App/Components/Studio/StudioToolbarContext.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local StudioToolbarContext = Roact.createContext(nil) -return StudioToolbarContext \ No newline at end of file +return StudioToolbarContext diff --git a/plugin/src/App/Components/TextButton.lua b/plugin/src/App/Components/TextButton.lua index e4e97e71..d33ddf9f 100644 --- a/plugin/src/App/Components/TextButton.lua +++ b/plugin/src/App/Components/TextButton.lua @@ -2,9 +2,10 @@ local TextService = game:GetService("TextService") local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local Theme = require(Plugin.App.Theme) local Assets = require(Plugin.Assets) @@ -134,4 +135,4 @@ function TextButton:render() end) end -return TextButton \ No newline at end of file +return TextButton diff --git a/plugin/src/App/Components/TouchRipple.lua b/plugin/src/App/Components/TouchRipple.lua index 955d0716..24ded570 100644 --- a/plugin/src/App/Components/TouchRipple.lua +++ b/plugin/src/App/Components/TouchRipple.lua @@ -1,8 +1,9 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local Assets = require(Plugin.Assets) local bindingUtil = require(Plugin.App.bindingUtil) @@ -142,4 +143,4 @@ function TouchRipple:render() }) end -return TouchRipple \ No newline at end of file +return TouchRipple diff --git a/plugin/src/App/Notifications.lua b/plugin/src/App/Notifications.lua index 97be8b45..5e1b0882 100644 --- a/plugin/src/App/Notifications.lua +++ b/plugin/src/App/Notifications.lua @@ -3,9 +3,10 @@ local StudioService = game:GetService("StudioService") local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local bindingUtil = require(script.Parent.bindingUtil) diff --git a/plugin/src/App/Page.lua b/plugin/src/App/Page.lua index 99b5a942..61387e21 100644 --- a/plugin/src/App/Page.lua +++ b/plugin/src/App/Page.lua @@ -1,8 +1,9 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Flipper = require(Rojo.Flipper) +local Roact = require(Packages.Roact) +local Flipper = require(Packages.Flipper) local Dictionary = require(Plugin.Dictionary) @@ -67,4 +68,4 @@ function Page:didUpdate(lastProps) end end -return Page \ No newline at end of file +return Page diff --git a/plugin/src/App/StatusPages/Connected.lua b/plugin/src/App/StatusPages/Connected.lua index 5793c6ba..58884128 100644 --- a/plugin/src/App/StatusPages/Connected.lua +++ b/plugin/src/App/StatusPages/Connected.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Theme = require(Plugin.App.Theme) local Assets = require(Plugin.Assets) @@ -122,4 +123,4 @@ function ConnectedPage.getDerivedStateFromProps(props) } end -return ConnectedPage \ No newline at end of file +return ConnectedPage diff --git a/plugin/src/App/StatusPages/Connecting.lua b/plugin/src/App/StatusPages/Connecting.lua index e45c3c53..b32b37bd 100644 --- a/plugin/src/App/StatusPages/Connecting.lua +++ b/plugin/src/App/StatusPages/Connecting.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Spinner = require(Plugin.App.Components.Spinner) @@ -17,4 +18,4 @@ function ConnectingPage:render() }) end -return ConnectingPage \ No newline at end of file +return ConnectingPage diff --git a/plugin/src/App/StatusPages/Error.lua b/plugin/src/App/StatusPages/Error.lua index 01ad1091..15fe5446 100644 --- a/plugin/src/App/StatusPages/Error.lua +++ b/plugin/src/App/StatusPages/Error.lua @@ -2,8 +2,9 @@ local TextService = game:GetService("TextService") local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Theme = require(Plugin.App.Theme) @@ -150,4 +151,4 @@ function ErrorPage.getDerivedStateFromProps(props) } end -return ErrorPage \ No newline at end of file +return ErrorPage diff --git a/plugin/src/App/StatusPages/NotConnected.lua b/plugin/src/App/StatusPages/NotConnected.lua index 7cc7abfc..08684b55 100644 --- a/plugin/src/App/StatusPages/NotConnected.lua +++ b/plugin/src/App/StatusPages/NotConnected.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Config = require(Plugin.Config) @@ -148,4 +149,4 @@ function NotConnectedPage:render() }) end -return NotConnectedPage \ No newline at end of file +return NotConnectedPage diff --git a/plugin/src/App/StatusPages/Settings/Setting.lua b/plugin/src/App/StatusPages/Settings/Setting.lua index 89fc8ad5..da6bf50a 100644 --- a/plugin/src/App/StatusPages/Settings/Setting.lua +++ b/plugin/src/App/StatusPages/Settings/Setting.lua @@ -2,8 +2,9 @@ local TextService = game:GetService("TextService") local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Settings = require(Plugin.Settings) local Theme = require(Plugin.App.Theme) diff --git a/plugin/src/App/StatusPages/Settings/init.lua b/plugin/src/App/StatusPages/Settings/init.lua index 4ffe226e..69fc16f9 100644 --- a/plugin/src/App/StatusPages/Settings/init.lua +++ b/plugin/src/App/StatusPages/Settings/init.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) +local Roact = require(Packages.Roact) local Assets = require(Plugin.Assets) local Theme = require(Plugin.App.Theme) diff --git a/plugin/src/App/Theme.lua b/plugin/src/App/Theme.lua index d27a2ecb..1ba2c35c 100644 --- a/plugin/src/App/Theme.lua +++ b/plugin/src/App/Theme.lua @@ -16,9 +16,10 @@ local function getStudio() end local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Log = require(Rojo.Log) +local Roact = require(Packages.Roact) +local Log = require(Packages.Log) local strict = require(script.Parent.Parent.strict) diff --git a/plugin/src/App/bindingUtil.lua b/plugin/src/App/bindingUtil.lua index daabd711..3797871e 100644 --- a/plugin/src/App/bindingUtil.lua +++ b/plugin/src/App/bindingUtil.lua @@ -1,7 +1,8 @@ local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Log = require(Rojo.Log) +local Roact = require(Packages.Roact) +local Log = require(Packages.Log) local LERP_DATA_TYPES = { Color3 = true, @@ -55,4 +56,4 @@ return { mapLerp = mapLerp, deriveProperty = deriveProperty, blendAlpha = blendAlpha, -} \ No newline at end of file +} diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index 9693220b..b477dd36 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -1,8 +1,9 @@ local Rojo = script:FindFirstAncestor("Rojo") local Plugin = Rojo.Plugin +local Packages = Rojo.Packages -local Roact = require(Rojo.Roact) -local Log = require(Rojo.Log) +local Roact = require(Packages.Roact) +local Log = require(Packages.Log) local Assets = require(Plugin.Assets) local Version = require(Plugin.Version) diff --git a/plugin/src/ChangeBatcher/createPatchSet.lua b/plugin/src/ChangeBatcher/createPatchSet.lua index e4c0fc0a..d418bb4d 100644 --- a/plugin/src/ChangeBatcher/createPatchSet.lua +++ b/plugin/src/ChangeBatcher/createPatchSet.lua @@ -5,7 +5,8 @@ of instances) and return the patch. ]] -local Log = require(script.Parent.Parent.Parent.Log) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) local PatchSet = require(script.Parent.Parent.PatchSet) diff --git a/plugin/src/ChangeBatcher/encodePatchUpdate.lua b/plugin/src/ChangeBatcher/encodePatchUpdate.lua index a3af8069..36888a88 100644 --- a/plugin/src/ChangeBatcher/encodePatchUpdate.lua +++ b/plugin/src/ChangeBatcher/encodePatchUpdate.lua @@ -1,5 +1,6 @@ -local Log = require(script.Parent.Parent.Parent.Log) -local RbxDom = require(script.Parent.Parent.Parent.RbxDom) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) +local RbxDom = require(Packages.RbxDom) local encodeProperty = require(script.Parent.encodeProperty) diff --git a/plugin/src/ChangeBatcher/encodeProperty.lua b/plugin/src/ChangeBatcher/encodeProperty.lua index e6ad95a2..52710e16 100644 --- a/plugin/src/ChangeBatcher/encodeProperty.lua +++ b/plugin/src/ChangeBatcher/encodeProperty.lua @@ -1,5 +1,6 @@ -local Log = require(script.Parent.Parent.Parent.Log) -local RbxDom = require(script.Parent.Parent.Parent.RbxDom) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) +local RbxDom = require(Packages.RbxDom) return function(instance, propertyName, propertyDescriptor) local readSuccess, readResult = propertyDescriptor:read(instance) diff --git a/plugin/src/InstanceMap.lua b/plugin/src/InstanceMap.lua index 2d9cbffb..5621e9be 100644 --- a/plugin/src/InstanceMap.lua +++ b/plugin/src/InstanceMap.lua @@ -1,6 +1,7 @@ local RunService = game:GetService("RunService") -local Log = require(script.Parent.Parent.Log) +local Packages = script.Parent.Parent.Packages +local Log = require(Packages.Log) --[[ A bidirectional map between instance IDs and Roblox instances. It lets us diff --git a/plugin/src/PatchSet.lua b/plugin/src/PatchSet.lua index d8fde747..fac6f945 100644 --- a/plugin/src/PatchSet.lua +++ b/plugin/src/PatchSet.lua @@ -3,7 +3,8 @@ patch returned from the API. ]] -local t = require(script.Parent.Parent.t) +local Packages = script.Parent.Parent.Packages +local t = require(Packages.t) local Types = require(script.Parent.Types) @@ -181,4 +182,4 @@ function PatchSet.humanSummary(instanceMap, patchSet) return table.concat(statements, "\n") end -return PatchSet \ No newline at end of file +return PatchSet diff --git a/plugin/src/Reconciler/Error.lua b/plugin/src/Reconciler/Error.lua index 5833420a..1e65c854 100644 --- a/plugin/src/Reconciler/Error.lua +++ b/plugin/src/Reconciler/Error.lua @@ -2,7 +2,8 @@ Defines the errors that can be returned by the reconciler. ]] -local Fmt = require(script.Parent.Parent.Parent.Fmt) +local Packages = script.Parent.Parent.Parent.Packages +local Fmt = require(Packages.Fmt) local Error = {} @@ -34,4 +35,4 @@ function Error:__tostring() return Fmt.fmt("Error({}): {:#?}", self.kind, self.details) end -return Error \ No newline at end of file +return Error diff --git a/plugin/src/Reconciler/applyPatch.lua b/plugin/src/Reconciler/applyPatch.lua index 4ecf3e1f..a625ebe9 100644 --- a/plugin/src/Reconciler/applyPatch.lua +++ b/plugin/src/Reconciler/applyPatch.lua @@ -5,7 +5,8 @@ Patches can come from the server or be generated by the client. ]] -local Log = require(script.Parent.Parent.Parent.Log) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) local PatchSet = require(script.Parent.Parent.PatchSet) local Types = require(script.Parent.Parent.Types) diff --git a/plugin/src/Reconciler/decodeValue.lua b/plugin/src/Reconciler/decodeValue.lua index 0fe7bf59..64c33ace 100644 --- a/plugin/src/Reconciler/decodeValue.lua +++ b/plugin/src/Reconciler/decodeValue.lua @@ -3,7 +3,8 @@ usable by Rojo's reconciler, potentially using RbxDom. ]] -local RbxDom = require(script.Parent.Parent.Parent.RbxDom) +local Packages = script.Parent.Parent.Parent.Packages +local RbxDom = require(Packages.RbxDom) local Error = require(script.Parent.Error) local function decodeValue(encodedValue, instanceMap) @@ -38,4 +39,4 @@ local function decodeValue(encodedValue, instanceMap) return true, decodedValue end -return decodeValue \ No newline at end of file +return decodeValue diff --git a/plugin/src/Reconciler/diff.lua b/plugin/src/Reconciler/diff.lua index e4cb7d88..995d06d8 100644 --- a/plugin/src/Reconciler/diff.lua +++ b/plugin/src/Reconciler/diff.lua @@ -3,7 +3,9 @@ patch that can be later applied. ]] -local Log = require(script.Parent.Parent.Parent.Log) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) + local invariant = require(script.Parent.Parent.invariant) local getProperty = require(script.Parent.getProperty) local Error = require(script.Parent.Error) @@ -152,4 +154,4 @@ local function diff(instanceMap, virtualInstances, rootId) return true, patch end -return diff \ No newline at end of file +return diff diff --git a/plugin/src/Reconciler/diff.spec.lua b/plugin/src/Reconciler/diff.spec.lua index 7618eea9..cc596eaa 100644 --- a/plugin/src/Reconciler/diff.spec.lua +++ b/plugin/src/Reconciler/diff.spec.lua @@ -1,5 +1,6 @@ return function() - local Log = require(script.Parent.Parent.Parent.Log) + local Packages = script.Parent.Parent.Parent.Packages + local Log = require(Packages.Log) local InstanceMap = require(script.Parent.Parent.InstanceMap) local PatchSet = require(script.Parent.Parent.PatchSet) @@ -286,4 +287,4 @@ return function() expect(size(patch.added)).to.equal(1) expect(patch.added["CHILD"]).to.equal(virtualInstances["CHILD"]) end) -end \ No newline at end of file +end diff --git a/plugin/src/Reconciler/getProperty.lua b/plugin/src/Reconciler/getProperty.lua index cd5c11f3..cd70fa24 100644 --- a/plugin/src/Reconciler/getProperty.lua +++ b/plugin/src/Reconciler/getProperty.lua @@ -2,7 +2,8 @@ Attempts to read a property from the given instance. ]] -local RbxDom = require(script.Parent.Parent.Parent.RbxDom) +local Packages = script.Parent.Parent.Parent.Packages +local RbxDom = require(Packages.RbxDom) local Error = require(script.Parent.Error) local function getProperty(instance, propertyName) @@ -56,4 +57,4 @@ local function getProperty(instance, propertyName) return true, valueOrErr end -return getProperty \ No newline at end of file +return getProperty diff --git a/plugin/src/Reconciler/setProperty.lua b/plugin/src/Reconciler/setProperty.lua index 316f920e..211a1491 100644 --- a/plugin/src/Reconciler/setProperty.lua +++ b/plugin/src/Reconciler/setProperty.lua @@ -2,8 +2,9 @@ Attempts to set a property on the given instance. ]] -local RbxDom = require(script.Parent.Parent.Parent.RbxDom) -local Log = require(script.Parent.Parent.Parent.Log) +local Packages = script.Parent.Parent.Parent.Packages +local Log = require(Packages.Log) +local RbxDom = require(Packages.RbxDom) local Error = require(script.Parent.Error) local function setProperty(instance, propertyName, value) @@ -45,4 +46,4 @@ local function setProperty(instance, propertyName, value) return true end -return setProperty \ No newline at end of file +return setProperty diff --git a/plugin/src/ServeSession.lua b/plugin/src/ServeSession.lua index ec6de75e..5ea3b11f 100644 --- a/plugin/src/ServeSession.lua +++ b/plugin/src/ServeSession.lua @@ -1,9 +1,10 @@ local StudioService = game:GetService("StudioService") local RunService = game:GetService("RunService") -local Log = require(script.Parent.Parent.Log) -local Fmt = require(script.Parent.Parent.Fmt) -local t = require(script.Parent.Parent.t) +local Packages = script.Parent.Parent.Packages +local Log = require(Packages.Log) +local Fmt = require(Packages.Fmt) +local t = require(Packages.t) local ChangeBatcher = require(script.Parent.ChangeBatcher) local InstanceMap = require(script.Parent.InstanceMap) diff --git a/plugin/src/Settings.lua b/plugin/src/Settings.lua index 6513d41c..206ed3e7 100644 --- a/plugin/src/Settings.lua +++ b/plugin/src/Settings.lua @@ -4,8 +4,9 @@ local plugin = plugin or script:FindFirstAncestorWhichIsA("Plugin") local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages -local Log = require(Rojo.Log) +local Log = require(Packages.Log) local defaultSettings = { openScriptsExternally = false, diff --git a/plugin/src/Types.lua b/plugin/src/Types.lua index ebd8efe1..ee66d520 100644 --- a/plugin/src/Types.lua +++ b/plugin/src/Types.lua @@ -1,5 +1,5 @@ -local t = require(script.Parent.Parent.t) - +local Packages = script.Parent.Parent.Packages +local t = require(Packages.t) local DevSettings = require(script.Parent.DevSettings) local strict = require(script.Parent.strict) diff --git a/plugin/src/init.server.lua b/plugin/src/init.server.lua index 43c271c1..564ebbd7 100644 --- a/plugin/src/init.server.lua +++ b/plugin/src/init.server.lua @@ -2,19 +2,20 @@ if not plugin then return end -local Log = require(script.Parent.Log) +local Rojo = script:FindFirstAncestor("Rojo") +local Packages = Rojo.Packages + +local Log = require(Packages.Log) +local Roact = require(Packages.Roact) local DevSettings = require(script.DevSettings) +local Config = require(script.Config) +local App = require(script.App) Log.setLogLevelThunk(function() return DevSettings:getLogLevel() end) -local Roact = require(script.Parent.Roact) - -local Config = require(script.Config) -local App = require(script.App) - local app = Roact.createElement(App, { plugin = plugin }) diff --git a/plugin/src/invariant.lua b/plugin/src/invariant.lua index 7cb813b4..37f4d756 100644 --- a/plugin/src/invariant.lua +++ b/plugin/src/invariant.lua @@ -1,4 +1,6 @@ -local Fmt = require(script.Parent.Parent.Fmt) + +local Packages = script.Parent.Parent.Packages +local Fmt = require(Packages.Fmt) local Config = require(script.Parent.Config) @@ -26,4 +28,4 @@ else end end -return invariant \ No newline at end of file +return invariant diff --git a/plugin/src/preloadAssets.lua b/plugin/src/preloadAssets.lua index edbc37d7..c37ca032 100644 --- a/plugin/src/preloadAssets.lua +++ b/plugin/src/preloadAssets.lua @@ -1,6 +1,7 @@ local ContentProvider = game:GetService("ContentProvider") -local Log = require(script.Parent.Parent.Log) +local Packages = script.Parent.Parent.Packages +local Log = require(Packages.Log) local Assets = require(script.Parent.Assets) @@ -29,4 +30,4 @@ local function preloadAssets() end)() end -return preloadAssets \ No newline at end of file +return preloadAssets diff --git a/plugin/src/runTests.lua b/plugin/src/runTests.lua index ea6172c2..b2c7e231 100644 --- a/plugin/src/runTests.lua +++ b/plugin/src/runTests.lua @@ -1,5 +1,6 @@ return function(TestEZ) local Rojo = script.Parent.Parent + local Packages = Rojo.Packages - TestEZ.TestBootstrap:run({ Rojo.Plugin, Rojo.Http, Rojo.Log }) -end \ No newline at end of file + TestEZ.TestBootstrap:run({ Rojo.Plugin, Packages.Http, Packages.Log, Packages.RbxDom }) +end diff --git a/plugin/src/soundPlayer.lua b/plugin/src/soundPlayer.lua index a58e8364..c1d018c2 100644 --- a/plugin/src/soundPlayer.lua +++ b/plugin/src/soundPlayer.lua @@ -1,13 +1,16 @@ -- Sounds only play in Edit mode when parented to a plugin widget, for some reason local plugin = plugin or script:FindFirstAncestorWhichIsA("Plugin") -local widget = plugin:CreateDockWidgetPluginGui("Rojo_soundPlayer", DockWidgetPluginGuiInfo.new( - Enum.InitialDockState.Float, - false, true, - 10, 10, - 10, 10 -)) -widget.Name = "Rojo_soundPlayer" -widget.Title = "Rojo Sound Player" +local widget = nil +if plugin then + widget = plugin:CreateDockWidgetPluginGui("Rojo_soundPlayer", DockWidgetPluginGuiInfo.new( + Enum.InitialDockState.Float, + false, true, + 10, 10, + 10, 10 + )) + widget.Name = "Rojo_soundPlayer" + widget.Title = "Rojo Sound Player" +end local SoundPlayer = {} SoundPlayer.__index = SoundPlayer diff --git a/plugin/test-place.project.json b/plugin/test-place.project.json index b75fcaae..9ac37f8b 100644 --- a/plugin/test-place.project.json +++ b/plugin/test-place.project.json @@ -8,8 +8,8 @@ "$path": "default.project.json" }, - "TestEZ": { - "$path": "modules/testez" + "Packages": { + "$path": "DevPackages" } }, diff --git a/plugin/wally.lock b/plugin/wally.lock new file mode 100644 index 00000000..e5c3f47c --- /dev/null +++ b/plugin/wally.lock @@ -0,0 +1,33 @@ +# This file is automatically @generated by Wally. +# It is not intended for manual editing. +registry = "test" + +[[package]] +name = "evaera/promise" +version = "4.0.0" +dependencies = [] + +[[package]] +name = "osyrisrblx/t" +version = "3.0.0" +dependencies = [] + +[[package]] +name = "reselim/flipper" +version = "2.0.0" +dependencies = [] + +[[package]] +name = "roblox/roact" +version = "1.4.4" +dependencies = [] + +[[package]] +name = "roblox/testez" +version = "0.4.1" +dependencies = [] + +[[package]] +name = "rojo-rbx/rojo" +version = "7.2.1" +dependencies = [["Flipper", "reselim/flipper@2.0.0"], ["Promise", "evaera/promise@4.0.0"], ["Roact", "roblox/roact@1.4.4"], ["t", "osyrisrblx/t@3.0.0"]] diff --git a/plugin/wally.toml b/plugin/wally.toml new file mode 100644 index 00000000..31ef5662 --- /dev/null +++ b/plugin/wally.toml @@ -0,0 +1,17 @@ +[package] +name = "rojo-rbx/rojo" +description = "Rojo enables Roblox developers to use professional-grade software engineering tools" +version = "7.2.1" +license = "MPL-2.0" +authors = ["LPGhatguy (https://lpg.space/)"] +registry = "https://github.com/upliftgames/wally-index" +realm = "shared" + +[dependencies] +Flipper = "reselim/flipper@2.0.0" +Promise = "evaera/promise@4.0.0" +Roact = "roblox/roact@1.4.4" +t = "osyrisrblx/t@3.0.0" + +[dev-dependencies] +TestEZ = "roblox/testez@0.4.1"