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

Bevy 0.6 Upgrade #7

Merged
merged 9 commits into from
Jan 15, 2022
Merged

Bevy 0.6 Upgrade #7

merged 9 commits into from
Jan 15, 2022

Conversation

chrisburnor
Copy link
Contributor

Will resolve #5

Right now this only fixes the basic and templates examples. The other two depend on changes in the renderer that still need work.

Does not yet implement the discussed better ProtoComponent approach. This branch just hacks by making ProtoComponent extend Send + Sync + 'static

Copy link
Owner

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

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

I know this is still in draft form, but I thought I'd give it a quick review to help speed it along 😉

.gitignore Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
examples/bench.rs Outdated Show resolved Hide resolved
src/components.rs Outdated Show resolved Hide resolved
src/data.rs Outdated Show resolved Hide resolved
@MrGVSV
Copy link
Owner

MrGVSV commented Jan 13, 2022

And for others' reference, this PR is a temporary fix until the other solutions proposed in #5 have been worked out. This is just so we can get something up and running for Bevy 0.6 while that change goes into development.

src/components.rs Outdated Show resolved Hide resolved
src/components.rs Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/components.rs Outdated Show resolved Hide resolved
prototype: &'c dyn Prototypical,
commands: EntityCommands<'a, 'b>,
) -> ProtoCommands<'a, 'b, 'c> {
pub fn get_commands<'w, 's, 'a, 'p>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW, I like keeping the lifetimes consistent with what bevy names its lifetimes. Since these are essentially wrappers on those underlying objects, it makes it quite a bit more straightforward to reason about which lifetime corresponds to which object.

Copy link
Owner

Choose a reason for hiding this comment

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

I agree (hence the 'a and 'b used previously). Thanks for doing that!

Cargo.toml Outdated
@@ -1,7 +1,7 @@
[package]
name = "bevy_proto"
version = "0.2.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might be good to bump the minor version with this change at least.

Copy link
Owner

Choose a reason for hiding this comment

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

No I'll definitely bump the major version haha, just prefer to do that last in case other PRs or changes need to be merged before bumping. Just keeps everything on the same page 🙂

@chrisburnor chrisburnor marked this pull request as ready for review January 15, 2022 17:28
Copy link
Owner

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

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

Looking good! I still need to run it myself to verify, but I'll try to get this out asap.

Cargo.toml Outdated
@@ -1,7 +1,7 @@
[package]
name = "bevy_proto"
version = "0.2.1"
Copy link
Owner

Choose a reason for hiding this comment

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

No I'll definitely bump the major version haha, just prefer to do that last in case other PRs or changes need to be merged before bumping. Just keeps everything on the same page 🙂

prototype: &'c dyn Prototypical,
commands: EntityCommands<'a, 'b>,
) -> ProtoCommands<'a, 'b, 'c> {
pub fn get_commands<'w, 's, 'a, 'p>(
Copy link
Owner

Choose a reason for hiding this comment

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

I agree (hence the 'a and 'b used previously). Thanks for doing that!

@MrGVSV
Copy link
Owner

MrGVSV commented Jan 15, 2022

I'll try my hand at implementing the other solution today as well, but if I can't get it done, I'll just release what you have here. I don't want to delay a 0.6-compatible release for those that need it.

@MrGVSV
Copy link
Owner

MrGVSV commented Jan 15, 2022

All the examples seem to run fine. Thank you for the changes!

@MrGVSV MrGVSV merged commit 300a408 into MrGVSV:main Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bevy 0.6
2 participants