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

using prelude rather than ecs::xyz in derive #99

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ homepage = "https://github.com/zkat/big-brain"
[workspace]

[dependencies]
bevy = { version = "0.13.0", default-features = false }
bevy = { version = "0.13.2", default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's customary to bump these minor versions in libraries. Local setups usually handle choosing the right version. not sure though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for comment. I will happily revert if indeed bad pattern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally and it looks like it works with either 0.13.0 or 0.13.2. Again, not sure if bad pattern or not, just something I might've seen/heard elsewhere

big-brain-derive = { version = "=0.19.0", path = "./derive" }

[dev-dependencies]
bevy = { version = "0.13.0", default-features = true }
bevy = { version = "0.13.2", default-features = true }
rand = { version = "0.8.5", features = ["small_rng"] }
bevy-scene-hook = "10.0.0"

Expand Down
2 changes: 1 addition & 1 deletion derive/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn build_method(component_name: &Ident, ty_generics: &syn::TypeGenerics) -> Toke
let turbofish = ty_generics.as_turbofish();

quote! {
fn build(&self, cmd: &mut ::bevy::ecs::system::Commands, action: ::bevy::ecs::entity::Entity, _actor: ::bevy::ecs::entity::Entity) {
fn build(&self, cmd: &mut ::bevy::prelude::Commands, action: ::bevy::prelude::Entity, _actor: ::bevy::prelude::Entity) {
cmd.entity(action).insert(#component_name #turbofish::clone(self));
}
}
Expand Down
2 changes: 1 addition & 1 deletion derive/src/scorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn build_method(component_name: &Ident, ty_generics: &syn::TypeGenerics) -> Toke
let turbofish = ty_generics.as_turbofish();

quote! {
fn build(&self, cmd: &mut ::bevy::ecs::system::Commands, scorer: ::bevy::ecs::entity::Entity, _actor: ::bevy::ecs::entity::Entity) {
fn build(&self, cmd: &mut ::bevy::prelude::Commands, scorer: ::bevy::prelude::Entity, _actor: ::bevy::prelude::Entity) {
cmd.entity(scorer).insert(#component_name #turbofish::clone(self));
}
}
Expand Down
Loading