mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 06:05:24 +00:00
Use rbx_reflection to allow type inference on projects (#130)
* Start dependency on rbx_reflection * Alive and working, all tests pass * Update CHANGELOG
This commit is contained in:
committed by
GitHub
parent
be81de74cd
commit
93349ae2dc
@@ -9,7 +9,7 @@ use std::{
|
||||
use log::warn;
|
||||
use failure::Fail;
|
||||
use maplit::hashmap;
|
||||
use rbx_dom_weak::RbxValue;
|
||||
use rbx_dom_weak::{UnresolvedRbxValue, RbxValue};
|
||||
use serde_derive::{Serialize, Deserialize};
|
||||
|
||||
pub static PROJECT_FILENAME: &'static str = "default.project.json";
|
||||
@@ -64,7 +64,7 @@ struct SourceProjectNode {
|
||||
class_name: Option<String>,
|
||||
|
||||
#[serde(rename = "$properties", default = "HashMap::new", skip_serializing_if = "HashMap::is_empty")]
|
||||
properties: HashMap<String, RbxValue>,
|
||||
properties: HashMap<String, UnresolvedRbxValue>,
|
||||
|
||||
#[serde(rename = "$ignoreUnknownInstances", skip_serializing_if = "Option::is_none")]
|
||||
ignore_unknown_instances: Option<bool>,
|
||||
@@ -188,7 +188,7 @@ pub enum ProjectSaveError {
|
||||
pub struct ProjectNode {
|
||||
pub class_name: Option<String>,
|
||||
pub children: HashMap<String, ProjectNode>,
|
||||
pub properties: HashMap<String, RbxValue>,
|
||||
pub properties: HashMap<String, UnresolvedRbxValue>,
|
||||
pub ignore_unknown_instances: Option<bool>,
|
||||
|
||||
#[serde(serialize_with = "crate::path_serializer::serialize_option")]
|
||||
@@ -284,7 +284,7 @@ impl Project {
|
||||
properties: hashmap! {
|
||||
String::from("HttpEnabled") => RbxValue::Bool {
|
||||
value: true,
|
||||
},
|
||||
}.into(),
|
||||
},
|
||||
..Default::default()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user