-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Resolve extension references inside the extension themselves (#…
…1783) When deserializing an `ExtensionRegistry`, traverses the extension definitions to update any `Weak<Extension>` so they point to valid extensions (including to extensions in the registry being deserialized!). This needed a bit of `unsafe` trickery to mimic [`Arc::new_cyclic`](https://doc.rust-lang.org/std/sync/struct.Arc.html#method.new_cyclic) but for vectors of extensions. As with `Package`, I left the `serde::Deserialize` implementation available but now extension registries have a `load_json` method that should be used when possible, as it runs the required pointer updates. BREAKING CHANGE: Marked `ExtensionBuildError` and `ExtensionRegistryError` as non-exhaustive.
- Loading branch information
Showing
8 changed files
with
418 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.