mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 13:15:50 +00:00
Upgrade to rbx_dom_weak 2.0 (#377)
* Mostly mechanical port bits * Almost there * It builds again! * Turn on all the code again * Tests compiling but not passing * Stub work for value resolution * Implement resolution minus enums and derived properties * Implement property descriptor resolution * Update referent snapshots * Update unions test project Using a place file instead of a model yields better error messages in Roblox Studio. * Add easy shortcut to testing with local rbx-dom * Update rbx-dom * Add enum resolution * Update init.meta.json to use UnresolvedValue * Expand value resolution support, add test * Filter SharedString values from web API * Add 'property' builder method to InstanceSnapshot * Change InstanceSnapshot/InstanceBuilder boundary * Fix remove_file crash * rustfmt * Update to latest rbx_dom_lua * Update dependencies, including rbx_dom_weak * Update to latest rbx-dom * Update dependencies * Update rbx-dom, fixing more bugs * Remove experimental warning on binary place builds * Remove unused imports
This commit is contained in:
committed by
GitHub
parent
b84aab0960
commit
59ef5f05ea
@@ -6,7 +6,7 @@ use std::{
|
||||
use crossbeam_channel::{select, Receiver, RecvError, Sender};
|
||||
use jod_thread::JoinHandle;
|
||||
use memofs::{IoResultExt, Vfs, VfsEvent};
|
||||
use rbx_dom_weak::{RbxId, RbxValue};
|
||||
use rbx_dom_weak::types::{Ref, Variant};
|
||||
|
||||
use crate::{
|
||||
message_queue::MessageQueue,
|
||||
@@ -179,7 +179,7 @@ impl JobThreadContext {
|
||||
InstigatingSource::Path(path) => fs::remove_file(path).unwrap(),
|
||||
InstigatingSource::ProjectNode(_, _, _, _) => {
|
||||
log::warn!(
|
||||
"Cannot remove instance {}, it's from a project file",
|
||||
"Cannot remove instance {:?}, it's from a project file",
|
||||
id
|
||||
);
|
||||
}
|
||||
@@ -187,12 +187,12 @@ impl JobThreadContext {
|
||||
} else {
|
||||
// TODO
|
||||
log::warn!(
|
||||
"Cannot remove instance {}, it is not an instigating source.",
|
||||
"Cannot remove instance {:?}, it is not an instigating source.",
|
||||
id
|
||||
);
|
||||
}
|
||||
} else {
|
||||
log::warn!("Cannot remove instance {}, it does not exist.", id);
|
||||
log::warn!("Cannot remove instance {:?}, it does not exist.", id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ impl JobThreadContext {
|
||||
{
|
||||
match instigating_source {
|
||||
InstigatingSource::Path(path) => {
|
||||
if let Some(RbxValue::String { value }) = changed_value {
|
||||
if let Some(Variant::String(value)) = changed_value {
|
||||
fs::write(path, value).unwrap();
|
||||
} else {
|
||||
log::warn!("Cannot change Source to non-string value.");
|
||||
@@ -227,14 +227,14 @@ impl JobThreadContext {
|
||||
}
|
||||
InstigatingSource::ProjectNode(_, _, _, _) => {
|
||||
log::warn!(
|
||||
"Cannot remove instance {}, it's from a project file",
|
||||
"Cannot remove instance {:?}, it's from a project file",
|
||||
id
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log::warn!(
|
||||
"Cannot update instance {}, it is not an instigating source.",
|
||||
"Cannot update instance {:?}, it is not an instigating source.",
|
||||
id
|
||||
);
|
||||
}
|
||||
@@ -243,7 +243,7 @@ impl JobThreadContext {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log::warn!("Cannot update instance {}, it does not exist.", id);
|
||||
log::warn!("Cannot update instance {:?}, it does not exist.", id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ impl JobThreadContext {
|
||||
}
|
||||
}
|
||||
|
||||
fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: RbxId) -> Option<AppliedPatchSet> {
|
||||
fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: Ref) -> Option<AppliedPatchSet> {
|
||||
let metadata = tree
|
||||
.get_metadata(id)
|
||||
.expect("metadata missing for instance present in tree");
|
||||
@@ -263,7 +263,7 @@ fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: RbxId) -> Optio
|
||||
Some(path) => path,
|
||||
None => {
|
||||
log::error!(
|
||||
"Instance {} did not have an instigating source, but was considered for an update.",
|
||||
"Instance {:?} did not have an instigating source, but was considered for an update.",
|
||||
id
|
||||
);
|
||||
log::error!("This is a bug. Please file an issue!");
|
||||
|
||||
Reference in New Issue
Block a user