mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Update dependencies and improve syncback handling
- Updated versions of several dependencies in `Cargo.lock`, including `async-compression` (0.4.40), `aws-lc-rs` (1.16.0), `bumpalo` (3.20.1), and `compression-codecs` (0.4.37), ensuring compatibility and access to the latest features and fixes. - Refactored the `fire` method in `SyncbackSignal` to return a boolean indicating whether a syncback was successfully initiated, preventing concurrent syncbacks. - Enhanced error handling in the API syncback process to return a conflict response if a syncback is already in progress. - Improved the `serve.rs` file by replacing `forget` with `drop` for better memory management and added checks to ensure service chunk integrity during live syncback operations. - Added new tests for edge cases and resilience in live syncback functionality, ensuring robustness against malformed data and rapid sequential requests. These changes aim to enhance the reliability and performance of the syncback feature while keeping dependencies up to date.
This commit is contained in:
parent
69f0b9fd63
commit
5b38648ead
12 changed files with 387 additions and 117 deletions
|
|
@ -880,10 +880,8 @@ mod tests {
|
|||
let mut new_dom = WeakDom::new(InstanceBuilder::new("DataModel"));
|
||||
let new_root = new_dom.root_ref();
|
||||
|
||||
let new_model_a = new_dom.insert(
|
||||
new_root,
|
||||
InstanceBuilder::new("Model").with_name("Weapon"),
|
||||
);
|
||||
let new_model_a =
|
||||
new_dom.insert(new_root, InstanceBuilder::new("Model").with_name("Weapon"));
|
||||
let new_handle = new_dom.insert(
|
||||
new_model_a,
|
||||
InstanceBuilder::new("Part").with_name("Handle"),
|
||||
|
|
@ -894,14 +892,9 @@ mod tests {
|
|||
.properties
|
||||
.insert("PrimaryPart".into(), Variant::Ref(new_handle));
|
||||
|
||||
let new_model_b = new_dom.insert(
|
||||
new_root,
|
||||
InstanceBuilder::new("Model").with_name("Weapon"),
|
||||
);
|
||||
let new_grip = new_dom.insert(
|
||||
new_model_b,
|
||||
InstanceBuilder::new("Part").with_name("Grip"),
|
||||
);
|
||||
let new_model_b =
|
||||
new_dom.insert(new_root, InstanceBuilder::new("Model").with_name("Weapon"));
|
||||
let new_grip = new_dom.insert(new_model_b, InstanceBuilder::new("Part").with_name("Grip"));
|
||||
new_dom
|
||||
.get_by_ref_mut(new_model_b)
|
||||
.unwrap()
|
||||
|
|
@ -912,24 +905,17 @@ mod tests {
|
|||
let mut old_dom = WeakDom::new(InstanceBuilder::new("DataModel"));
|
||||
let old_root = old_dom.root_ref();
|
||||
|
||||
let old_model_b = old_dom.insert(
|
||||
old_root,
|
||||
InstanceBuilder::new("Model").with_name("Weapon"),
|
||||
);
|
||||
let old_grip = old_dom.insert(
|
||||
old_model_b,
|
||||
InstanceBuilder::new("Part").with_name("Grip"),
|
||||
);
|
||||
let old_model_b =
|
||||
old_dom.insert(old_root, InstanceBuilder::new("Model").with_name("Weapon"));
|
||||
let old_grip = old_dom.insert(old_model_b, InstanceBuilder::new("Part").with_name("Grip"));
|
||||
old_dom
|
||||
.get_by_ref_mut(old_model_b)
|
||||
.unwrap()
|
||||
.properties
|
||||
.insert("PrimaryPart".into(), Variant::Ref(old_grip));
|
||||
|
||||
let old_model_a = old_dom.insert(
|
||||
old_root,
|
||||
InstanceBuilder::new("Model").with_name("Weapon"),
|
||||
);
|
||||
let old_model_a =
|
||||
old_dom.insert(old_root, InstanceBuilder::new("Model").with_name("Weapon"));
|
||||
let old_handle = old_dom.insert(
|
||||
old_model_a,
|
||||
InstanceBuilder::new("Part").with_name("Handle"),
|
||||
|
|
@ -961,14 +947,8 @@ mod tests {
|
|||
let new_inst = new_dom.get_by_ref(*new_ref).unwrap();
|
||||
let old_inst = old_dom.get_by_ref(*old_ref).unwrap();
|
||||
|
||||
let new_child_name = &new_dom
|
||||
.get_by_ref(new_inst.children()[0])
|
||||
.unwrap()
|
||||
.name;
|
||||
let old_child_name = &old_dom
|
||||
.get_by_ref(old_inst.children()[0])
|
||||
.unwrap()
|
||||
.name;
|
||||
let new_child_name = &new_dom.get_by_ref(new_inst.children()[0]).unwrap().name;
|
||||
let old_child_name = &old_dom.get_by_ref(old_inst.children()[0]).unwrap().name;
|
||||
assert_eq!(
|
||||
new_child_name, old_child_name,
|
||||
"Ref scoring failed: new model with child '{}' matched old model with child '{}'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue