Problem with using a local fork of Bevy #9869
-
Bevy version0.11.2 What you didI'm using Bevy to make some. I'm also using some crates which depend on Bevy (e.g. bevy_xpbd, bevy-inspector-egui). For some reason I need to switch from the official Bevy crate to a local repo. That's when issues happen. What went wrongSee Jondolf/avian#157 for details. Additional informationNone. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
How did you switch? To which version? Are you defining a direct dependency or a patch? |
Beta Was this translation helpful? Give feedback.
-
I changed |
Beta Was this translation helpful? Give feedback.
-
You should not change your dependency, and instead add a patch section: [patch.crates-io]
bevy = { path = "../bevy" } See https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section If you change just your dependency, it will only change the version of Bevy in your own project. This will also change it in all your dependencies that use Bevy |
Beta Was this translation helpful? Give feedback.
-
I did as you suggested. The compile error about "component" is gone, and I can build it with bevy_xpbd succesfully. However, if I use bevy_inspector_egui, another issue happens:
But /// A resource for storing `bevy_egui` user textures.
#[derive(Clone, Resource, Default)]
pub struct EguiUserTextures {
textures: HashMap<Handle<Image>, u64>,
last_texture_id: u64,
} |
Beta Was this translation helpful? Give feedback.
-
This is likely another "mismatched versions" problem unfortunately :/ The [Cheatbook] provides useful guidance here: https://bevy-cheatbook.github.io/setup/bevy-git.html?highlight=bleed#should-you-use-bleeding-edge-bevy |
Beta Was this translation helpful? Give feedback.
-
you need to explicitly override every bevy crates. Make sure to add [patch.crates-io]
bevy = { path = "path/to/local/bevy" }
bevy_app = { path = "path/to/local/bevy/crates/bevy_app" }
bevy_asset = { path = "path/to/local/bevy/crates/bevy_asset" }
bevy_core = { path = "path/to/local/bevy/crates/bevy_core" }
bevy_ecs = { path = "path/to/local/bevy/crates/bevy_ecs" }
bevy_hierarchy = { path = "path/to/local/bevy/crates/bevy_hierarchy" }
bevy_log = { path = "path/to/local/bevy/crates/bevy_log" }
bevy_math = { path = "path/to/local/bevy/crates/bevy_math" }
bevy_reflect = { path = "path/to/local/bevy/crates/bevy_reflect" }
bevy_utils = { path = "path/to/local/bevy/crates/bevy_utils" }
bevy_window = { path = "path/to/local/bevy/crates/bevy_window" }
bevy_mikktspace = { path = "path/to/local/bevy/crates/bevy_mikktspace" }
bevy_transform = { path = "path/to/local/bevy/crates/bevy_transform" }
bevy_render = { path = "path/to/local/bevy/crates/bevy_render" }
bevy_time = { path = "path/to/local/bevy/crates/bevy_time" }
bevy_core_pipeline = { path = "path/to/local/bevy/crates/bevy_core_pipeline" }
bevy_pbr = { path = "path/to/local/bevy/crates/bevy_pbr" } |
Beta Was this translation helpful? Give feedback.
you need to explicitly override every bevy crates.
Make sure to add
bevy_ecs
,bevy_app
etc… all bevy crates to yourpatch.crates-io
section. This is why I'd recommend 3rd party crate author to depend only explicitly onbevy
and not the subcrates…