Pin rbx-dom crates to released versions - #1
Open
Lauel09 wants to merge 1 commit into
Open
Conversation
The rbx-dom dependencies tracked `branch = "master"`, so any breaking
change upstream broke the build with no version to fall back to. That
happened: the crate no longer compiles against current master.
Switch to published releases (rbx_dom_weak 4, rbx_reflection 7,
rbx_binary/rbx_xml 3) and migrate the API accordingly:
- properties are keyed by Ustr, so look up Source with `ustr("Source")`
- `Instance::class` is a Ustr, so use `to_string()` where a String is needed
- `rbx_reflection::get_class_descriptor` is gone; look the class up in a
ReflectionDatabase instead, and test for services with
`tags.contains(&ClassTag::Service)`
- add rbx_reflection_database, preferring the locally installed database
(which tools like Rojo keep current) and falling back to the bundled one
- `rbx_binary::from_reader_default` is now `from_reader`
Verified by converting a 3 MB place with ~200 scripts: the extracted
sources match the ones in the .rbxl.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rbx-dom dependencies track
branch = "master":Any breaking change upstream lands here immediately with no version to fall back to, and that has now happened — the crate doesn't compile against current master. This switches to published releases and migrates the API.
Changes
rbx_dom_weak4,rbx_reflection7,rbx_binary/rbx_xml3, all from crates.ioUstr, soSourceis looked up withustr("Source")Instance::classis aUstr;to_string()where aStringis neededrbx_reflection::get_class_descriptorno longer exists — classes are looked up in aReflectionDatabase, and services are detected withtags.contains(&ClassTag::Service)rbx_reflection_database, preferring the locally installed database (kept current by tools like Rojo) and falling back to the bundled one, so newer classes resolve on machines that have itrbx_binary::from_reader_default→from_readerNo behaviour change intended; this is a dependency and API migration.
Testing
cargo checkis clean for bothparcel-liband thesrc-tauricrate. Converted a 3 MB.rbxl(~200 scripts, ~80k instances) and diffed the extracted sources against the ones read out of the place file directly — they match.src-tauri/gen/schemas/*also regenerate on build; I left those out of this PR since they're build artifacts.