mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55: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
@@ -1,6 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rbx_dom_weak::{RbxId, RbxValue};
|
||||
use rbx_dom_weak::types::{Ref, Variant};
|
||||
use rojo_insta_ext::RedactionMap;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -29,15 +29,15 @@ pub fn intern_tree(tree: &RojoTree, redactions: &mut RedactionMap) {
|
||||
/// Copy of data from RojoTree in the right shape to have useful snapshots.
|
||||
#[derive(Debug, Serialize)]
|
||||
struct InstanceView {
|
||||
id: RbxId,
|
||||
id: Ref,
|
||||
name: String,
|
||||
class_name: String,
|
||||
properties: HashMap<String, RbxValue>,
|
||||
properties: HashMap<String, Variant>,
|
||||
metadata: InstanceMetadata,
|
||||
children: Vec<InstanceView>,
|
||||
}
|
||||
|
||||
fn extract_instance_view(tree: &RojoTree, id: RbxId) -> InstanceView {
|
||||
fn extract_instance_view(tree: &RojoTree, id: Ref) -> InstanceView {
|
||||
let instance = tree.get_instance(id).unwrap();
|
||||
|
||||
InstanceView {
|
||||
|
||||
Reference in New Issue
Block a user