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:
Lucien Greathouse
2019-02-26 22:51:21 -08:00
committed by GitHub
parent be81de74cd
commit 93349ae2dc
7 changed files with 43 additions and 16 deletions

View File

@@ -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()
},