Skip to content

Commit

Permalink
Don't bail on attempt to reflect unknown serialized data types (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethloeffler authored Nov 1, 2024
1 parent bc8ab6b commit 8ecd2fa
Showing 1 changed file with 15 additions and 5 deletions.
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

0 comments on commit 8ecd2fa

Please sign in to comment.