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

Fix failing proc macros when depending on bevy through dev and normal dependencies. #17795

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
2 changes: 1 addition & 1 deletion crates/bevy_macro_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["bevy"]
syn = "2.0"
quote = "1.0"
proc-macro2 = "1.0"
cargo-manifest-proc-macros = "0.3.3"
cargo-manifest-proc-macros = "0.3.4"

[lints]
workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/bevy_macro_utils/src/bevy_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ impl BevyManifest {
/// Returns the path for the crate with the given name.
pub fn get_path(&self, name: &str) -> syn::Path {
self.maybe_get_path(name)
//.expect("Failed to get path for crate")
.unwrap_or_else(|_err| Self::parse_str(name))
.expect("Failed to get path for crate")
}

/// Attempt to parse the provided [path](str) as a [syntax tree node](syn::parse::Parse)
Expand Down
5 changes: 5 additions & 0 deletions tests-integration/simple-ecs-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
name = "simple-ecs-test"
edition = "2021"

# We depend on bevy in both normal and dev dependencies to verify that the proc macros still work.

[dependencies]
bevy = { path = "../../" }

[dev-dependencies]
bevy = { path = "../../" }
Loading