-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Deprecate dynamic plugins #13080
Deprecate dynamic plugins #13080
Conversation
I've added the "needs release notes" label, though I can be convinced otherwise. I don't know how large of an impact this change will make. |
852fc12
to
9b6ef6f
Compare
Previously attempted in #3893 See #3893 (comment) for Cart's opinion at the time. My position remains about the same as it was then:
Given the presence of testing showing indications of UB during reasonable use, I think now's as good a time as any to officially drop support. |
maybe the deprecated comment could redirect to something like "go comment on this pr if you see this message" to encourage potential users to report back |
I'd also like to express my support for this change. Aside from the correctness issues, the current version also effectively blocks some advanced plugin build ordering/order-independence features. |
I added a deprecation notice in 1b97d99. Hopefully if the alternatives listed do not support someone's use-case, they will comment here. (It may help designing a new API!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this makes sense. working with this crate requires a lot of finesse, and from my woes a few years 👀 ago, once you have the conceptual understanding needed to use this crate, its really not very much work to implement it from scratch yourself.
I am sorry, how again is this controversial? I haven't seen any comment indicating such. |
This was controversial the last time it was tried, which makes this sort of controversial-by-default. |
@cart disagreed with this change last time it was attempted. (#3893 (comment)) No one has picked up dynamic plugins and tried to improve it since deprecating it was last attempted. Furthermore, I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I relent. A bit bummed that we're removing useful baseline functionality, but I agree that using it soundly is hard and that exposes people to risk. I won't fight this anymore :)
# Objective - The current implementation for dynamic plugins is unsound. Please see bevyengine#11969 for background and justification. - Closes bevyengine#11969 and closes bevyengine#13073. ## Solution - Deprecate all dynamic plugin items for Bevy 0.14, with plans to remove them for Bevy 0.15. ## Discussion One thing I want to make clear is that I'm not opposed to dynamic plugins _in general_. I think they can be handy, especially for DLC and modding, but I think the current system is the wrong approach. It's too much of a footgun for the meager benefit is provides. --- ## Changelog - Deprecated the current dynamic plugin system. - Dynamic plugins will be removed in Bevy 0.15. For now you can continue using them by marking your code with `#[allow(deprecated)]`. ## Migration Guide If possible, remove all usage of dynamic plugins. ```rust // Old #[derive(DynamicPlugin)] pub struct MyPlugin; App::new() .load_plugin("path/to/plugin") .run(); // New pub struct MyPlugin; App::new() .add_plugins(MyPlugin) .run(); ``` If you are unable to do that, you may temporarily silence the deprecation warnings. ```rust #[allow(deprecated)] ``` Please note that the current dynamic plugin system will be removed by the next major Bevy release, so you will have to migrate eventually. You may be interested in these safer alternatives: - [Bevy Assets - Scripting]: Scripting and modding libraries for Bevy - [Bevy Assets - Development tools]: Hot reloading and other development functionality - [`stabby`]: Stable Rust ABI [Bevy Assets - Scripting]: https://bevyengine.org/assets/#scripting [Bevy Assets - Development tools]: https://bevyengine.org/assets/#development-tools [`stabby`]: https://github.com/ZettaScaleLabs/stabby
Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1321 if you'd like to help out. |
Objective
bevy_dynamic_plugin
implementation #11969 for background and justification.bevy_dynamic_plugin
implementation #11969 and closes User-mode data execution prevention (DEP) violation when loading Dynamic Plugins #13073 and closes Unloading/reloading dynamic plugins #4843.Solution
Discussion
One thing I want to make clear is that I'm not opposed to dynamic plugins in general. I think they can be handy, especially for DLC and modding, but I think the current system is the wrong approach. It's too much of a footgun for the meager benefit is provides.
Changelog
#[allow(deprecated)]
.Migration Guide
If possible, remove all usage of dynamic plugins.
If you are unable to do that, you may temporarily silence the deprecation warnings.
#[allow(deprecated)]
Please note that the current dynamic plugin system will be removed by the next major Bevy release, so you will have to migrate eventually. You may be interested in these safer alternatives:
stabby
: Stable Rust ABI