Merge branch 'master' into headless-api

This commit is contained in:
boatbomber 2024-01-17 15:02:58 -08:00 • committed by GitHub
commit 34f920a70c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 1286 additions and 171 deletions

View file

@ -2,14 +2,19 @@
## Unreleased Changes
* Added headless API for Studio companion plugins. ([#631])
[#631]: https://github.com/rojo-rbx/rojo/pull/631
## [7.4.0] - January 16, 2024
* Improved the visualization for array properties like Tags ([#829])
* Significantly improved performance of `rojo serve`, `rojo build --watch`, and `rojo sourcemap --watch` on macOS. ([#830])
* Changed *.lua files that init command generates to *.luau ([#831])
* Does not remind users to sync if the sync lock is claimed already ([#833])
[#631]: https://github.com/rojo-rbx/rojo/pull/631
[#829]: https://github.com/rojo-rbx/rojo/pull/829
[#830]: https://github.com/rojo-rbx/rojo/pull/830
[#831]: https://github.com/rojo-rbx/rojo/pull/831
[#833]: https://github.com/rojo-rbx/rojo/pull/833
## [7.4.0-rc3] - October 25, 2023
* Changed `sourcemap --watch` to only generate the sourcemap when it's necessary ([#800])

26
Cargo.lock generated
View file

@ -1586,9 +1586,9 @@ dependencies = [
[[package]]
name = "rbx_binary"
version = "0.7.3"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad50c13afe91296dad6508ea7e29f4b665fa56cb664ad01eaf8fdbd3da69d5e1"
checksum = "6314dd6bf5c21d0598cdb53cf5d241aa643ba41da8b8abf7402b4a35096f03f6"
dependencies = [
"log",
"lz4",
@ -1601,9 +1601,9 @@ dependencies = [
[[package]]
name = "rbx_dom_weak"
version = "2.6.0"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843a2e0e1446623625943f7228d9d4b5cf3883017e3964733600682506864b34"
checksum = "9b67b56bac99849c2e3c57547b036927f71c57cf7f4d900d04e3e4ee774ec316"
dependencies = [
"rbx_types",
"serde",
@ -1611,9 +1611,9 @@ dependencies = [
[[package]]
name = "rbx_reflection"
version = "4.4.0"
version = "4.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41e762dfca3217d2d37da631de2fa0d1616edaa61a0a2633263d5d3305baf8c3"
checksum = "0d41509c991b53a7276a746a795eae2b9204f398164920f61976995b47fe1722"
dependencies = [
"rbx_types",
"serde",
@ -1622,9 +1622,9 @@ dependencies = [
[[package]]
name = "rbx_reflection_database"
version = "0.2.9+roblox-596"
version = "0.2.10+roblox-607"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b18f088a2b4aa66324ec97b5b6ffacb53188aef19f3497d95d6a1d1dbb28e66"
checksum = "12e20c06fa41f7aadc79005c8354f592b2c2f4d0c61e1080ed5718dafc30aea0"
dependencies = [
"lazy_static",
"rbx_reflection",
@ -1634,9 +1634,9 @@ dependencies = [
[[package]]
name = "rbx_types"
version = "1.7.0"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a991523e3ad5f43a4d121cb4a1e5bc23f7826bb4a1db5aa51e94f1073150ec"
checksum = "7ca23bfd469d067d81ef14f65fe09aeddc25abcf576a889d1a7664fe021cf18c"
dependencies = [
"base64 0.13.1",
"bitflags 1.3.2",
@ -1649,9 +1649,9 @@ dependencies = [
[[package]]
name = "rbx_xml"
version = "0.13.2"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc87343301303ff0510903fb7eb3dbd1c75bdb6ab780fea6091bdc3f58b5829f"
checksum = "f8c03f95500961c32340791d1fabd4587f6873bdbff077ecca6ae32db7960dea"
dependencies = [
"base64 0.13.1",
"log",
@ -1831,7 +1831,7 @@ dependencies = [
[[package]]
name = "rojo"
version = "7.4.0-rc3"
version = "7.4.0"
dependencies = [
"anyhow",
"backtrace",

View file

@ -1,6 +1,6 @@
[package]
name = "rojo"
version = "7.4.0-rc3"
version = "7.4.0"
rust-version = "1.70.0"
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
description = "Enables professional-grade development tools for Roblox developers"
@ -49,11 +49,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.7.3"
rbx_dom_weak = "2.6.0"
rbx_reflection = "4.4.0"
rbx_reflection_database = "0.2.8"
rbx_xml = "0.13.2"
rbx_binary = "0.7.4"
rbx_dom_weak = "2.7.0"
rbx_reflection = "4.5.0"
rbx_reflection_database = "0.2.10"
rbx_xml = "0.13.3"
anyhow = "1.0.44"
backtrace = "0.3.61"

View file

@ -48,12 +48,8 @@ fn main() -> Result<(), anyhow::Error> {
let plugin_version =
Version::parse(fs::read_to_string(plugin_root.join("Version.txt"))?.trim())?;
assert!(
our_version.major == plugin_version.major,
"plugin version does not match Cargo version"
);
assert!(
our_version.minor == plugin_version.minor,
assert_eq!(
our_version, plugin_version,
"plugin version does not match Cargo version"
);

View file

@ -1 +1 @@
7.4.0-rc3
7.4.0

File diff suppressed because it is too large Load diff

View file

@ -192,6 +192,7 @@ function App:init()
and self.serveSession == nil
and Settings:get("syncReminder")
and self:getLastSyncTimestamp()
and (self:isSyncLockAvailable())
then
self:addNotification("You've previously synced this place. Would you like to reconnect?", 300, {
Connect = {
@ -373,12 +374,39 @@ function App:getHostAndPort(): (string, string)
return host, port
end
function App:isSyncLockAvailable()
if #Players:GetPlayers() == 0 then
-- Team Create is not active, so no one can be holding the lock
return true
end
local lock = ServerStorage:FindFirstChild("__Rojo_SessionLock")
if not lock then
-- No lock is made yet, so it is available
return true
end
if lock.Value and lock.Value ~= Players.LocalPlayer and lock.Value.Parent then
-- Someone else is holding the lock
return false, lock.Value
end
-- The lock exists, but is not claimed
return true
end
function App:claimSyncLock()
if #Players:GetPlayers() == 0 then
Log.trace("Skipping sync lock because this isn't in Team Create")
return true
end
local isAvailable, priorOwner = self:isSyncLockAvailable()
if not isAvailable then
Log.trace("Skipping sync lock because it is already claimed")
return false, priorOwner
end
local lock = ServerStorage:FindFirstChild("__Rojo_SessionLock")
if not lock then
lock = Instance.new("ObjectValue")
@ -390,11 +418,6 @@ function App:claimSyncLock()
return true
end
if lock.Value and lock.Value ~= Players.LocalPlayer and lock.Value.Parent then
Log.trace("Found existing sync lock owned by {}", lock.Value)
return false, lock.Value
end
lock.Value = Players.LocalPlayer
Log.trace("Claimed existing sync lock")
return true

View file

@ -146,7 +146,7 @@ impl OutputKind {
}
}
fn xml_encode_config() -> rbx_xml::EncodeOptions {
fn xml_encode_config() -> rbx_xml::EncodeOptions<'static> {
rbx_xml::EncodeOptions::new().property_behavior(rbx_xml::EncodePropertyBehavior::WriteUnknown)
}

View file

@ -8,9 +8,7 @@ use std::{
use serde::{Deserialize, Serialize};
use thiserror::Error;
use crate::{
glob::Glob, resolution::UnresolvedValue, snapshot_middleware::emit_legacy_scripts_default,
};
use crate::{glob::Glob, resolution::UnresolvedValue};
static PROJECT_FILENAME: &str = "default.project.json";
@ -75,12 +73,10 @@ pub struct Project {
#[serde(skip_serializing_if = "Option::is_none")]
pub serve_address: Option<IpAddr>,
/// Determines if rojo should emit scripts with the appropriate `RunContext` for `*.client.lua` and `*.server.lua` files in the project.
/// Or, if rojo should keep the legacy behavior of emitting LocalScripts and Scripts with legacy Runcontext
#[serde(
default = "emit_legacy_scripts_default",
skip_serializing_if = "Option::is_none"
)]
/// Determines if Rojo should emit scripts with the appropriate `RunContext`
/// for `*.client.lua` and `*.server.lua` files in the project instead of
/// using `Script` and `LocalScript` Instances.
#[serde(skip_serializing_if = "Option::is_none")]
pub emit_legacy_scripts: Option<bool>,
/// A list of globs, relative to the folder the project file is in, that