Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't bail on attempt to reflect unknown serialized data types #472

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions rbx_reflector/src/cli/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,18 @@ fn apply_dump(database: &mut ReflectionDatabase, dump: &Dump) -> anyhow::Result<
// are usually only present in Roblox Studio
// settings files. They are not used otherwise and
// can safely be ignored.
(None, PropertyKind::Canonical {
serialization: PropertySerialization::Serializes
}) if type_name != "QDir" && type_name != "QFont" => bail!(
(
None,
PropertyKind::Canonical {
serialization: PropertySerialization::Serializes,
},
) if type_name != "QDir" && type_name != "QFont" => {
log::warn!(
"Property {}.{} serializes, but its data type ({}) is unimplemented",
dump_class.name, dump_property.name, type_name
),
);
continue;
}

// The data type does not have a corresponding a
// VariantType, and it does not serialize (with QDir
Expand All @@ -241,7 +247,11 @@ fn apply_dump(database: &mut ReflectionDatabase, dump: &Dump) -> anyhow::Result<
// need to know about data types that are never
// serialized.
(None, _) => {
ignored_properties.push((&dump_class.name, &dump_property.name, type_name));
ignored_properties.push((
&dump_class.name,
&dump_property.name,
type_name,
));
continue;
}
}
Expand Down