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

Switch git submodules to Wally packages #584

Merged
merged 16 commits into from
Aug 3, 2022
Merged
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
28 changes: 23 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand All @@ -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

Expand All @@ -42,8 +51,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand All @@ -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
run: cargo clippy
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -92,8 +96,6 @@ jobs:
BIN: rojo
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Get Version from Tag
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions .gitmodules

This file was deleted.

17 changes: 1 addition & 16 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,14 @@ 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"))?,
"http" => snapshot_from_fs_path(&plugin_root.join("http"))?,
"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");
Expand Down
5 changes: 3 additions & 2 deletions foreman.toml
Original file line number Diff line number Diff line change
@@ -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"}
56 changes: 24 additions & 32 deletions plugin/default.project.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
"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"
}
}
}
}
1 change: 0 additions & 1 deletion plugin/modules/flipper
Submodule flipper deleted from 4cf7a0
1 change: 0 additions & 1 deletion plugin/modules/promise
Submodule promise deleted from 7fb09d
1 change: 0 additions & 1 deletion plugin/modules/roact
Submodule roact deleted from f7d2f1
1 change: 0 additions & 1 deletion plugin/modules/t
Submodule t deleted from f643b5
1 change: 0 additions & 1 deletion plugin/modules/testez
Submodule testez deleted from 25d957
4 changes: 2 additions & 2 deletions plugin/run-tests.server.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local TestEZ = require(ReplicatedStorage.TestEZ)
local TestEZ = require(ReplicatedStorage.Packages.TestEZ)

local Rojo = ReplicatedStorage.Rojo

Expand All @@ -16,4 +16,4 @@ require(Rojo.Plugin.runTests)(TestEZ)

if setDevSettings then
DevSettings:resetValues()
end
end
11 changes: 6 additions & 5 deletions plugin/src/ApiContext.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -248,4 +249,4 @@ function ApiContext:open(id)
end)
end

return ApiContext
return ApiContext
5 changes: 3 additions & 2 deletions plugin/src/App/Components/BorderedContainer.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -38,4 +39,4 @@ local function BorderedContainer(props)
end)
end

return BorderedContainer
return BorderedContainer
7 changes: 4 additions & 3 deletions plugin/src/App/Components/Checkbox.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -93,4 +94,4 @@ function Checkbox:render()
end)
end

return Checkbox
return Checkbox
5 changes: 3 additions & 2 deletions plugin/src/App/Components/Header.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -52,4 +53,4 @@ local function Header(props)
end)
end

return Header
return Header
7 changes: 4 additions & 3 deletions plugin/src/App/Components/IconButton.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -76,4 +77,4 @@ function IconButton:render()
})
end

return IconButton
return IconButton
5 changes: 3 additions & 2 deletions plugin/src/App/Components/ScrollingFrame.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -39,4 +40,4 @@ local function ScrollingFrame(props)
end)
end

return ScrollingFrame
return ScrollingFrame
5 changes: 3 additions & 2 deletions plugin/src/App/Components/SlicedImage.lua
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -26,4 +27,4 @@ local function SlicedImage(props)
}, props[Roact.Children])
end

return SlicedImage
return SlicedImage
5 changes: 3 additions & 2 deletions plugin/src/App/Components/Spinner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -63,4 +64,4 @@ function Spinner:willUnmount()
self.stepper:Disconnect()
end

return Spinner
return Spinner
3 changes: 2 additions & 1 deletion plugin/src/App/Components/Studio/StudioPluginAction.lua
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
Loading