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.13 support #302

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Bevy 0.13 support #302

merged 4 commits into from
Apr 2, 2024

Conversation

theshortcut
Copy link
Contributor

@theshortcut theshortcut commented Feb 21, 2024

Leaving this in draft until StarArawn/bevy_ecs_tilemap#508 merges.

Upstream bevy_ecs_tilemap PR has merged, but a new release hasn't been cut. PR updated to note that main here tracks to main for ECS Tilemap which both allow for Bevy 0.13 support and PR should be mergeable.

Most of the changes here are related to the new TextureAtlasLayout and the examples in the repo look correct to me still at least.

Fixes #301

@neocturne
Copy link
Contributor

I've updated my project to use this branch, and I haven't noticed any issues 🎉
(besides having to add a number of manual LdtkEntity impls to work around #305, but that is unrelated to this PR)

@linonetwo
Copy link

Hi @theshortcut , StarArawn/bevy_ecs_tilemap#508 is merged.

@linonetwo
Copy link

linonetwo commented Mar 13, 2024

Get some error when using

bevy = "0.13.0"
bevy_ecs_tilemap = { git = "https://github.com/StarArawn/bevy_ecs_tilemap" }
bevy_ecs_ldtk = { git = "https://github.com/theshortcut/bevy_ecs_ldtk/", branch = "bevy-0.13" }
% cargo check
    Checking bevy_ecs_ldtk v0.9.0 (https://github.com/theshortcut/bevy_ecs_ldtk/?branch=bevy-0.13#ef466f3a)
error[E0308]: mismatched types
   --> /Users/linonetwo/.cargo/git/checkouts/bevy_ecs_ldtk-a845ef6482ca980f/ef466f3/src/tile_makers.rs:210:17
    |
209 |               color: TileColor(
    |                      --------- arguments to this struct are incorrect
210 | /                 *color_map
211 | |                     .get(&value)
212 | |                     .expect("Int grid values should have an associated IntGridValueDefinition"),
    | |_______________________________________________________________________________________________^ expected `bevy_render::color::Color`, found `bevy::prelude::Color`
    |
    = note: `bevy::prelude::Color` and `bevy_render::color::Color` have similar names, but are actually distinct types
note: `bevy::prelude::Color` is defined in crate `bevy_render`
// omited

@neocturne
Copy link
Contributor

@linonetwo Your [dependencies] entry for bevy_ecs_tilemap must match the one in bevy_ecs_ldtk (bevy_ecs_tilemap = "0.12") to allow cargo to unify them (or you can omit it altogether if your crate does not use bevy_ecs_tilemap directly).

Use the [patch.crates-io] section to override that dependency to use the current git version:

[patch.crates-io]
bevy_ecs_tilemap = { git = "https://github.com/StarArawn/bevy_ecs_tilemap" }

@theshortcut
Copy link
Contributor Author

yep looks like the PR merged but we'd still need a release of bevy_ecs_tilemap cut to be able to bump the dependency here and release a version of bevy_ecs_ldtk. I'll mark this PR as ready for review anyway and keep an eye on crate releases.

@theshortcut theshortcut marked this pull request as ready for review March 13, 2024 23:32
Copy link
Owner

@Trouv Trouv left a comment

Choose a reason for hiding this comment

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

Thanks a lot for taking this off my plate. Here's a couple small comments. I need to figure out why CI isn't running and try out the examples next

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@theshortcut
Copy link
Contributor Author

@Trouv I've updated the cargo patch definition to pull from upstream main branch instead of the PR branch and the compat table in the readme.

@Trouv
Copy link
Owner

Trouv commented Mar 28, 2024

It seems that your last push allowed me to run the CI. It's passing but the "Build and test book" job is actually secretly failing (see #270).

 - Test: how-to-guides/respawn-levels-and-worlds.md_sect_respawn_the_currently_selected_level_line_76 (Failed to compile)
 - Test: how-to-guides/respawn-levels-and-worlds.md_sect_respawn_the_currently_selected_level_line_32 (Failed to compile)

Those md files are in the book/src directory. I think it's just Input -> ButtonInput and KeyCode::L -> KeyCode::KeyL changes

@theshortcut
Copy link
Contributor Author

theshortcut commented Mar 28, 2024

Updated and locally ran mdbook which passes the mdbook-keeper tests for me. Will check the CI build when that goes too thanks for catching that.

EDIT: looks like the build & test book passed in CI as well 🎉

Copy link
Owner

@Trouv Trouv left a comment

Choose a reason for hiding this comment

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

LGTM, and I've verified the examples are working as expected. Thanks again!

@Trouv Trouv merged commit 2ee602f into Trouv:main Apr 2, 2024
5 checks passed
@Trouv Trouv mentioned this pull request Apr 2, 2024
Trouv added a commit that referenced this pull request Jul 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.10.0](v0.9.0...v0.10.0)
(2024-07-20)


### ⚠ BREAKING CHANGES

* upgrade to bevy and bevy_ecs_ldtk 0.14
([#325](#325))
* upgrade to bevy 0.13
([#302](#302))

### Features

* add #[default] attribute to LdtkEntity and LdtkIntCell derive macros
([#306](#306))
([416a46e](416a46e))
* upgrade to bevy 0.13
([#302](#302))
([2ee602f](2ee602f)),
closes [#301](#301)
* upgrade to bevy and bevy_ecs_ldtk 0.14
([#325](#325))
([d888535](d888535))


### Documentation Changes

* remove unused AssetServer param in *Game logic integration* chapter
([#318](#318))
([617b108](617b108))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.13
4 participants