Skip to content

Plugin Dependencies #69

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

Open
cart opened this issue Jul 24, 2020 · 2 comments · May be fixed by #18187 or #7839
Open

Plugin Dependencies #69

cart opened this issue Jul 24, 2020 · 2 comments · May be fixed by #18187 or #7839
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design This issue requires design work to think about how it would best be accomplished X-Controversial There is active debate or serious implications around merging this PR

Comments

@cart
Copy link
Member

cart commented Jul 24, 2020

Some plugins require other plugins to work. We should allow plugins to define dependencies that must be registered before them. This would also help ensure that plugins are registered in the correct order (where that matters).

@alice-i-cecile
Copy link
Member

Plugin ordering could be solved by #1255 instead.

@alice-i-cecile alice-i-cecile added S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged and removed E-Help-Wanted labels Dec 12, 2021
@alice-i-cecile alice-i-cecile added this to the 0.11 milestone Feb 27, 2023
@maniwani maniwani linked a pull request Feb 28, 2023 that will close this issue
@alice-i-cecile alice-i-cecile added X-Controversial There is active debate or serious implications around merging this PR and removed S-Needs-Design-Doc This issue or PR is particularly complex, and needs an approved design doc before it can be merged labels Feb 28, 2023
@alice-i-cecile alice-i-cecile removed this from the 0.11 milestone Jun 11, 2023
@BenjaminBrienen BenjaminBrienen added the D-Complex Quite challenging from either a design or technical perspective. Ask for help! label Oct 29, 2024
tychedelia pushed a commit to tychedelia/bevy that referenced this issue Nov 23, 2024
@BenjaminBrienen BenjaminBrienen added the S-Needs-Design This issue requires design work to think about how it would best be accomplished label Jan 23, 2025
@SpecificProtagonist SpecificProtagonist linked a pull request Mar 7, 2025 that will close this issue
@hukasu
Copy link
Contributor

hukasu commented Mar 29, 2025

My proposition is:
Plugin only has one method setup which has aSettingUpApp as argument and which only has add_systems and configure_sets (my use of app is not that thorough so the only methods that I would use are these), they don't take a schedule as an argument as it is implicit that it is the "Build" schedule

struct MyPlugin;
impl Plugin for MyPlugin {
  fn setup(app: &mut SettingUpApp) {
    #[cfg(feature = "wasm32"]
    app.configure_sets((MyPluginSet::Systems, MyPluginSet::WasmResource).chain());

 
   app.add_systems(insert_systems.in_set(MyPluginSet::Systems));
    #[cfg(feature = "wasm32")]
    app.add_systems(wasm_resources.in_set(MyPluginSet::WasmResource));
  }
}

Or something like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Complex Quite challenging from either a design or technical perspective. Ask for help! S-Needs-Design This issue requires design work to think about how it would best be accomplished X-Controversial There is active debate or serious implications around merging this PR
Projects
None yet
5 participants