Skip to content
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

Move commands module into bevy::ecs::world #11628

Closed
JoJoJet opened this issue Jan 31, 2024 · 5 comments · Fixed by #12234
Closed

Move commands module into bevy::ecs::world #11628

JoJoJet opened this issue Jan 31, 2024 · 5 comments · Fixed by #12234
Labels
A-ECS Entities, components, systems, and events D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@JoJoJet
Copy link
Member

JoJoJet commented Jan 31, 2024

What problem does this solve or what need does it fill?

Currently, commands live in bevy::ecs::system, as they are referred to a "system commands". It would make more sense to put this module in world, as commands are an abstraction for efficiently applying mutations to a world. Systems are only a consumer of this API.

What solution would you like?

Command and CommandQueue should go into bevy::ecs::world. Commands and ParallelCommands should stay in bevy::ecs::system.

What alternative(s) have you considered?

None

Additional context

None

@JoJoJet JoJoJet added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled and removed C-Feature A new feature, making something new possible labels Jan 31, 2024
@mockersf mockersf added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events and removed S-Needs-Triage This issue needs to be labelled labels Jan 31, 2024
@targrub
Copy link
Contributor

targrub commented Jan 31, 2024

I'll work on this.

@JoJoJet
Copy link
Member Author

JoJoJet commented Jan 31, 2024

On second thought it would be good to hold off until after #10756

@JoJoJet JoJoJet added the S-Blocked This cannot move forward until something else changes label Jan 31, 2024
@targrub
Copy link
Contributor

targrub commented Mar 1, 2024

Now that #10756 is merged, shall I proceed with this proposal?

@JoJoJet JoJoJet removed the S-Blocked This cannot move forward until something else changes label Mar 1, 2024
@JoJoJet
Copy link
Member Author

JoJoJet commented Mar 1, 2024

Please!

@targrub
Copy link
Contributor

targrub commented Mar 1, 2024

The need to have a migration for this change will annoy people, I suspect.

From:

use bevy_ecs {
    system::{Command, CommandQueue, Commands},
    world::World,
}

To:

use bevy_ecs {
    system::Commands,
    world::{Command, CommandQueue, World},
}

github-merge-queue bot pushed a commit that referenced this issue Mar 2, 2024
# Objective

Fixes #11628

## Migration Guide

`Command` and `CommandQueue` have migrated from `bevy_ecs::system` to
`bevy_ecs::world`, so `use bevy_ecs::world::{Command, CommandQueue};`
when necessary.
spectria-limina pushed a commit to spectria-limina/bevy that referenced this issue Mar 9, 2024
# Objective

Fixes bevyengine#11628

## Migration Guide

`Command` and `CommandQueue` have migrated from `bevy_ecs::system` to
`bevy_ecs::world`, so `use bevy_ecs::world::{Command, CommandQueue};`
when necessary.
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 D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants