Skip to content

Hardening proc macro path resolution broke cargo overrides #17780

@alice-i-cecile

Description

@alice-i-cecile

This broke all my usages of bevy derive with messages like this:

error[E0433]: failed to resolve: use of undeclared crate or module `bevy_reflect`
   --> C:\Users\pcwal\Source\Rust\leafwing-input-manager\src\lib.rs:144:41
    |
144 | #[derive(Debug, Clone, Copy, PartialEq, Reflect, Serialize, Deserialize)]
    |                                         ^^^^^^^ use of undeclared crate or module `bevy_reflect`
    |
    = note: struct `crate::user_input::trait_reflection::tripleaxislike::TypeRegistration` exists but is inaccessible
    = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)

and

error[E0277]: `user_input::gamepad::GamepadStick` can not provide dynamic type information through reflection
   --> C:\Users\pcwal\Source\Rust\leafwing-input-manager\src\user_input\gamepad.rs:548:23
    |
548 | impl DualAxislike for GamepadStick {
    |                       ^^^^^^^^^^^^ the trait `bevy::bevy_reflect::Typed` is not implemented for `user_input::gamepad::GamepadStick`

For reference, I'm using Cargo overrides to redirect Bevy 0.16.0 to the local repo.

Originally posted by @pcwalton in #17330 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorD-MacrosCode that generates Rust codeP-HighThis is particularly urgent, and deserves immediate attentionP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions