mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api
This commit is contained in:
commit
ba634d4778
23 changed files with 6989 additions and 1329 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
|
@ -16,10 +16,12 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
rust_version: [stable, 1.58.1]
|
||||
rust_version: [stable, 1.69.0]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
|
@ -33,12 +35,6 @@ jobs:
|
|||
with:
|
||||
version: 'v0.2.7'
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
cd plugin
|
||||
wally install
|
||||
cd ..
|
||||
|
||||
- name: Build
|
||||
run: cargo build --locked --verbose
|
||||
|
||||
|
|
@ -51,6 +47,8 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
|
|
@ -64,14 +62,8 @@ jobs:
|
|||
with:
|
||||
version: 'v0.2.7'
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
cd plugin
|
||||
wally install
|
||||
cd ..
|
||||
|
||||
- name: Rustfmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy
|
||||
run: cargo clippy
|
||||
|
|
|
|||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
|
@ -28,6 +28,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup Aftman
|
||||
uses: ok-nick/setup-aftman@v0.1.0
|
||||
|
|
@ -36,12 +38,6 @@ jobs:
|
|||
trust-check: false
|
||||
version: 'v0.2.6'
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
cd plugin
|
||||
wally install
|
||||
cd ..
|
||||
|
||||
- name: Build Plugin
|
||||
run: rojo build plugin --output Rojo.rbxm
|
||||
|
||||
|
|
@ -94,6 +90,8 @@ jobs:
|
|||
BIN: rojo
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Get Version from Tag
|
||||
shell: bash
|
||||
|
|
@ -117,13 +115,6 @@ jobs:
|
|||
trust-check: false
|
||||
version: 'v0.2.6'
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
cd plugin
|
||||
wally install
|
||||
cd ..
|
||||
shell: bash
|
||||
|
||||
- name: Build Release
|
||||
run: cargo build --release --locked --verbose
|
||||
env:
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -13,9 +13,6 @@
|
|||
# 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
|
||||
|
|
|
|||
15
.gitmodules
vendored
Normal file
15
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[submodule "plugin/Packages/Roact"]
|
||||
path = plugin/Packages/Roact
|
||||
url = git@github.com:roblox/roact
|
||||
[submodule "plugin/Packages/Flipper"]
|
||||
path = plugin/Packages/Flipper
|
||||
url = git@github.com:reselim/flipper
|
||||
[submodule "plugin/Packages/Promise"]
|
||||
path = plugin/Packages/Promise
|
||||
url = git@github.com:evaera/roblox-lua-promise
|
||||
[submodule "plugin/Packages/t"]
|
||||
path = plugin/Packages/t
|
||||
url = git@github.com:osyrisrblx/t
|
||||
[submodule "plugin/Packages/TestEZ"]
|
||||
path = plugin/Packages/TestEZ
|
||||
url = git@github.com:roblox/testez
|
||||
38
CHANGELOG.md
38
CHANGELOG.md
|
|
@ -1,9 +1,45 @@
|
|||
# Rojo Changelog
|
||||
|
||||
## Unreleased Changes
|
||||
* Added `--watch` flag to `rojo sourcemap` ([#602])
|
||||
* Significantly improved performance of `rojo sourcemap`. ([#668])
|
||||
|
||||
[#668]: https://github.com/rojo-rbx/rojo/pull/668
|
||||
|
||||
## [7.3.0] - April 22, 2023
|
||||
* Added `$attributes` to project format. ([#574])
|
||||
* Added `--watch` flag to `rojo sourcemap`. ([#602])
|
||||
* Added support for `init.csv` files. ([#594])
|
||||
* Added real-time sync status to the Studio plugin. ([#569])
|
||||
* Added support for copying error messages to the clipboard. ([#614])
|
||||
* Added sync locking for Team Create. ([#590])
|
||||
* Added support for specifying HTTP or HTTPS protocol in plugin. ([#642])
|
||||
* Added tooltips to buttons in the Studio plugin. ([#637])
|
||||
* Added visual diffs when connecting from the Studio plugin. ([#603])
|
||||
* Host and port are now saved in the Studio plugin. ([#613])
|
||||
* Improved padding on notifications in Studio plugin. ([#589])
|
||||
* Renamed `Common` to `Shared` in the default Rojo project. ([#611])
|
||||
* Reduced the minimum size of the Studio plugin widget. ([#606])
|
||||
* Fixed current directory in `rojo fmt-project`. ([#581])
|
||||
* Fixed errors after a session has already ended. ([#587])
|
||||
* Fixed an uncommon security permission error ([#619])
|
||||
|
||||
[#569]: https://github.com/rojo-rbx/rojo/pull/569
|
||||
[#574]: https://github.com/rojo-rbx/rojo/pull/574
|
||||
[#581]: https://github.com/rojo-rbx/rojo/pull/581
|
||||
[#587]: https://github.com/rojo-rbx/rojo/pull/587
|
||||
[#589]: https://github.com/rojo-rbx/rojo/pull/589
|
||||
[#590]: https://github.com/rojo-rbx/rojo/pull/590
|
||||
[#594]: https://github.com/rojo-rbx/rojo/pull/594
|
||||
[#602]: https://github.com/rojo-rbx/rojo/pull/602
|
||||
[#603]: https://github.com/rojo-rbx/rojo/pull/603
|
||||
[#606]: https://github.com/rojo-rbx/rojo/pull/606
|
||||
[#611]: https://github.com/rojo-rbx/rojo/pull/611
|
||||
[#613]: https://github.com/rojo-rbx/rojo/pull/613
|
||||
[#614]: https://github.com/rojo-rbx/rojo/pull/614
|
||||
[#619]: https://github.com/rojo-rbx/rojo/pull/619
|
||||
[#637]: https://github.com/rojo-rbx/rojo/pull/637
|
||||
[#642]: https://github.com/rojo-rbx/rojo/pull/642
|
||||
[7.3.0]: https://github.com/rojo-rbx/rojo/releases/tag/v7.3.0
|
||||
|
||||
## [7.2.1] - July 8, 2022
|
||||
* Fixed notification sound by changing it to a generic sound. ([#566])
|
||||
|
|
|
|||
1238
Cargo.lock
generated
1238
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
14
Cargo.toml
14
Cargo.toml
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "rojo"
|
||||
version = "7.2.1"
|
||||
rust-version = "1.58.1"
|
||||
version = "7.3.0"
|
||||
rust-version = "1.68.2"
|
||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
||||
description = "Enables professional-grade development tools for Roblox developers"
|
||||
license = "MPL-2.0"
|
||||
|
|
@ -51,11 +51,11 @@ memofs = { version = "0.2.0", path = "crates/memofs" }
|
|||
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
|
||||
# rbx_xml = { path = "../rbx-dom/rbx_xml" }
|
||||
|
||||
rbx_binary = "0.6.5"
|
||||
rbx_binary = "0.7.0"
|
||||
rbx_dom_weak = "2.4.0"
|
||||
rbx_reflection = "4.2.0"
|
||||
rbx_reflection_database = "0.2.2"
|
||||
rbx_xml = "0.12.3"
|
||||
rbx_reflection_database = "0.2.6"
|
||||
rbx_xml = "0.13.0"
|
||||
|
||||
anyhow = "1.0.44"
|
||||
backtrace = "0.3.61"
|
||||
|
|
@ -72,7 +72,9 @@ jod-thread = "0.1.2"
|
|||
log = "0.4.14"
|
||||
maplit = "1.0.2"
|
||||
notify = "4.0.17"
|
||||
num_cpus = "1.15.0"
|
||||
opener = "0.5.0"
|
||||
rayon = "1.7.0"
|
||||
reqwest = { version = "0.11.10", features = ["blocking", "json", "native-tls-vendored"] }
|
||||
ritz = "0.1.0"
|
||||
roblox_install = "1.0.0"
|
||||
|
|
@ -102,7 +104,7 @@ maplit = "1.0.2"
|
|||
rojo-insta-ext = { path = "crates/rojo-insta-ext" }
|
||||
|
||||
criterion = "0.3.5"
|
||||
insta = { version = "1.8.0", features = ["redactions"] }
|
||||
insta = { version = "1.8.0", features = ["redactions", "yaml"] }
|
||||
paste = "1.0.5"
|
||||
pretty_assertions = "1.2.1"
|
||||
serde_yaml = "0.8.21"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
[tools]
|
||||
wally = "UpliftGames/wally@0.3.1"
|
||||
rojo = "rojo-rbx/rojo@7.2.1"
|
||||
rojo = "rojo-rbx/rojo@7.3.0"
|
||||
selene = "Kampfkarren/selene@0.20.0"
|
||||
run-in-roblox = "rojo-rbx/run-in-roblox@0.3.0"
|
||||
|
|
|
|||
1
plugin/Packages/Flipper
Submodule
1
plugin/Packages/Flipper
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2d91a5ed55332a3bf50f4eba82f9c812bd2343f8
|
||||
1
plugin/Packages/Promise
Submodule
1
plugin/Packages/Promise
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2c6f433903275e689ba1d48402d4a9d6fdc605a5
|
||||
1
plugin/Packages/Roact
Submodule
1
plugin/Packages/Roact
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 956891b70fdc5410e44e9664719cd0a9f7e6fabd
|
||||
1
plugin/Packages/TestEZ
Submodule
1
plugin/Packages/TestEZ
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit edc7246d0173a3a90eba4a9f64ea26c576be5873
|
||||
1
plugin/Packages/t
Submodule
1
plugin/Packages/t
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1f9754254b17bff5a0b7527620083f8ea85f579a
|
||||
|
|
@ -238,6 +238,23 @@ types = {
|
|||
toPod = serializeFloat,
|
||||
},
|
||||
|
||||
Font = {
|
||||
fromPod = function(pod)
|
||||
return Font.new(
|
||||
pod.family,
|
||||
if pod.weight ~= nil then Enum.FontWeight[pod.weight] else nil,
|
||||
if pod.style ~= nil then Enum.FontStyle[pod.style] else nil
|
||||
)
|
||||
end,
|
||||
toPod = function(roblox)
|
||||
return {
|
||||
family = roblox.Family,
|
||||
weight = roblox.Weight.Name,
|
||||
style = roblox.Style.Name,
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
Int32 = {
|
||||
fromPod = identity,
|
||||
toPod = identity,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,11 @@ function PropertyDescriptor:read(instance)
|
|||
end
|
||||
|
||||
if self.scriptability == "Custom" then
|
||||
if customProperties[self.className] == nil then
|
||||
local fullName = ("%s.%s"):format(instance.className, self.name)
|
||||
return false, Error.new(Error.Kind.PropertyNotReadable, fullName)
|
||||
end
|
||||
|
||||
local interface = customProperties[self.className][self.name]
|
||||
|
||||
return interface.read(instance, self.name)
|
||||
|
|
@ -79,6 +84,11 @@ function PropertyDescriptor:write(instance, value)
|
|||
end
|
||||
|
||||
if self.scriptability == "Custom" then
|
||||
if customProperties[self.className] == nil then
|
||||
local fullName = ("%s.%s"):format(instance.className, self.name)
|
||||
return false, Error.new(Error.Kind.PropertyNotWritable, fullName)
|
||||
end
|
||||
|
||||
local interface = customProperties[self.className][self.name]
|
||||
|
||||
return interface.write(instance, self.name, value)
|
||||
|
|
|
|||
|
|
@ -207,6 +207,17 @@
|
|||
},
|
||||
"ty": "Float64"
|
||||
},
|
||||
"Font": {
|
||||
"value": {
|
||||
"Font": {
|
||||
"family": "rbxasset://fonts/families/SourceSansPro.json",
|
||||
"weight": "Regular",
|
||||
"style": "Normal",
|
||||
"cachedFaceId": null
|
||||
}
|
||||
},
|
||||
"ty": "Font"
|
||||
},
|
||||
"Int32": {
|
||||
"value": {
|
||||
"Int32": 6014
|
||||
|
|
|
|||
|
|
@ -61,4 +61,14 @@ return {
|
|||
end,
|
||||
},
|
||||
},
|
||||
Model = {
|
||||
Scale = {
|
||||
read = function(instance, _, _)
|
||||
return true, instance:GetScale()
|
||||
end,
|
||||
write = function(instance, _, value)
|
||||
return true, instance:ScaleTo(value)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,7 @@ local isDevBuild = script.Parent.Parent:FindFirstChild("ROJO_DEV_BUILD") ~= nil
|
|||
return strict("Config", {
|
||||
isDevBuild = isDevBuild,
|
||||
codename = "Epiphany",
|
||||
version = {7, 2, 1},
|
||||
version = {7, 3, 0},
|
||||
expectedServerVersionString = "7.2 or newer",
|
||||
protocolVersion = 4,
|
||||
defaultHost = "localhost",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
|
||||
"Packages": {
|
||||
"$path": "DevPackages"
|
||||
"$path": "Packages"
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
# 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"]]
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[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"
|
||||
|
|
@ -7,6 +7,7 @@ use std::{
|
|||
use clap::Parser;
|
||||
use fs_err::File;
|
||||
use memofs::Vfs;
|
||||
use rayon::prelude::*;
|
||||
use rbx_dom_weak::types::Ref;
|
||||
use serde::Serialize;
|
||||
use tokio::runtime::Runtime;
|
||||
|
|
@ -23,15 +24,15 @@ const PATH_STRIP_FAILED_ERR: &str = "Failed to create relative paths for project
|
|||
/// Representation of a node in the generated sourcemap tree.
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct SourcemapNode {
|
||||
name: String,
|
||||
class_name: String,
|
||||
struct SourcemapNode<'a> {
|
||||
name: &'a str,
|
||||
class_name: &'a str,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
file_paths: Vec<PathBuf>,
|
||||
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
children: Vec<SourcemapNode>,
|
||||
children: Vec<SourcemapNode<'a>>,
|
||||
}
|
||||
|
||||
/// Generates a sourcemap file from the Rojo project.
|
||||
|
|
@ -75,6 +76,13 @@ impl SourcemapCommand {
|
|||
filter_non_scripts
|
||||
};
|
||||
|
||||
// Pre-build a rayon threadpool with a low number of threads to avoid
|
||||
// dynamic creation overhead on systems with a high number of cpus.
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(num_cpus::get().min(6))
|
||||
.build_global()
|
||||
.unwrap();
|
||||
|
||||
write_sourcemap(&session, self.output.as_deref(), filter)?;
|
||||
|
||||
if self.watch {
|
||||
|
|
@ -108,20 +116,19 @@ fn filter_non_scripts(instance: &InstanceWithMeta) -> bool {
|
|||
)
|
||||
}
|
||||
|
||||
fn recurse_create_node(
|
||||
tree: &RojoTree,
|
||||
fn recurse_create_node<'a>(
|
||||
tree: &'a RojoTree,
|
||||
referent: Ref,
|
||||
project_dir: &Path,
|
||||
filter: fn(&InstanceWithMeta) -> bool,
|
||||
) -> Option<SourcemapNode> {
|
||||
) -> Option<SourcemapNode<'a>> {
|
||||
let instance = tree.get_instance(referent).expect("instance did not exist");
|
||||
|
||||
let mut children = Vec::new();
|
||||
for &child_id in instance.children() {
|
||||
if let Some(child_node) = recurse_create_node(tree, child_id, project_dir, filter) {
|
||||
children.push(child_node);
|
||||
}
|
||||
}
|
||||
let children: Vec<_> = instance
|
||||
.children()
|
||||
.par_iter()
|
||||
.filter_map(|&child_id| recurse_create_node(tree, child_id, project_dir, filter))
|
||||
.collect();
|
||||
|
||||
// If this object has no children and doesn't pass the filter, it doesn't
|
||||
// contain any information we're looking for.
|
||||
|
|
@ -140,8 +147,8 @@ fn recurse_create_node(
|
|||
.collect();
|
||||
|
||||
Some(SourcemapNode {
|
||||
name: instance.name().to_string(),
|
||||
class_name: instance.class_name().to_string(),
|
||||
name: instance.name(),
|
||||
class_name: instance.class_name(),
|
||||
file_paths,
|
||||
children,
|
||||
})
|
||||
|
|
@ -157,7 +164,7 @@ fn write_sourcemap(
|
|||
let root_node = recurse_create_node(&tree, tree.get_root_id(), session.root_dir(), filter);
|
||||
|
||||
if let Some(output_path) = output {
|
||||
let mut file = BufWriter::new(File::create(&output_path)?);
|
||||
let mut file = BufWriter::new(File::create(output_path)?);
|
||||
serde_json::to_writer(&mut file, &root_node)?;
|
||||
file.flush()?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue