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

[Merged by Bors] - Fix path used by macro not considering that we can use a sub-crate #3178

Closed
wants to merge 1 commit into from
Closed
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: 3 additions & 1 deletion crates/bevy_macro_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ impl BevyManifest {
const BEVY_INTERNAL: &str = "bevy_internal";

let find_in_deps = |deps: &DepsSet| -> Option<syn::Path> {
let package = if let Some(dep) = deps.get(BEVY) {
let package = if let Some(dep) = deps.get(name) {
return Some(get_path(dep.package().unwrap_or(name)));
} else if let Some(dep) = deps.get(BEVY) {
dep.package().unwrap_or(BEVY)
} else if let Some(dep) = deps.get(BEVY_INTERNAL) {
dep.package().unwrap_or(BEVY_INTERNAL)
Expand Down