Skip to content

Harden rbx_reflector against unknown data types#403

Merged
Dekkonot merged 6 commits intorojo-rbx:masterfrom
kennethloeffler:rbx-reflector-better-unimplemented-data-type-handling
Mar 29, 2024
Merged

Harden rbx_reflector against unknown data types#403
Dekkonot merged 6 commits intorojo-rbx:masterfrom
kennethloeffler:rbx-reflector-better-unimplemented-data-type-handling

Conversation

@kennethloeffler
Copy link
Member

Today I noticed that rbx_reflector generate failed to output a database due to a new datatype:

     Running `target/debug/rbx_reflector generate rbx_reflection_database/database.msgpack rbx_dom_lua/src/database.json --patches patches`
[INFO  rbx_reflector::cli::defaults_place] Installing Studio plugin
[INFO  rbx_reflector::cli::defaults_place] Starting Roblox Studio...
[INFO  rbx_reflector::cli::defaults_place] Waiting for Roblox Studio to re-save place...
[INFO  rbx_reflector::cli::defaults_place] Uninstalling Studio plugin
Please save the opened place in Roblox Studio (ctrl+s).
[INFO  rbx_reflector::cli::defaults_place] Place saved, killing Studio...
Error: Unknown type Path2DControlPoint

This got me thinking about how rbx_reflector can more gracefully deal with unknown data types. I intuit that we only need to care about unknown data types if they serialize. With this in mind, this PR makes rbx_reflector generate only bail on unknown serializable data types (with the exception of QDir and QFont - see comments).

@Dekkonot Dekkonot merged commit c8ec8a9 into rojo-rbx:master Mar 29, 2024
@kennethloeffler kennethloeffler deleted the rbx-reflector-better-unimplemented-data-type-handling branch March 29, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants