BlackPhlox / bevy_dolly

h3r2tic's dolly abstraction layer for the bevy game framework
Apache License 2.0
143 stars 22 forks source link

bevy_0.12: crate does not compile without helpers feature #41

Closed rparrett closed 9 months ago

rparrett commented 9 months ago
error[E0433]: failed to resolve: could not find `helpers` in the crate root
  --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/lib.rs:16:9
   |
16 |         helpers::{cone::*, cursor_grab::*, pos_ctrl::*},
   |         ^^^^^^^ could not find `helpers` in the crate root

error[E0432]: unresolved import `crate::helpers`
  --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/lib.rs:15:9
   |
15 |         helpers::*,
   |         ^^^^^^^ could not find `helpers` in the crate root

Also, does not compile with the helpers feature.

error[E0599]: no method named `iter` found for reference `&MoveAction` in the current scope
   --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/helpers/pos_ctrl.rs:127:29
    |
127 |             for (i, b) in v.iter().enumerate() {
    |                             ^^^^ method not found in `&MoveAction`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `iter`, perhaps you need to implement one of them:
            candidate #1: `Walker`
            candidate #2: `bevy::reflect::Array`
            candidate #3: `bevy::reflect::List`
            candidate #4: `bevy::reflect::Map`
            candidate #5: `bitflags::traits::Flags`
            candidate #6: `sysinfo::traits::NetworksExt`

error[E0599]: no method named `len` found for reference `&MoveAction` in the current scope
   --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/helpers/pos_ctrl.rs:145:22
    |
145 |                 if v.len() > 1 && i != v.len() - 1 {
    |                      ^^^ method not found in `&MoveAction`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `len`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `bevy::reflect::Array`
            candidate #3: `bevy::reflect::List`
            candidate #4: `bevy::reflect::Map`
            candidate #5: `BufferRef`
            candidate #6: `RuntimeSizedArray`
            candidate #7: `core_graphics::data_provider::CustomData`

error[E0599]: no method named `len` found for reference `&MoveAction` in the current scope
   --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/helpers/pos_ctrl.rs:145:42
    |
145 |                 if v.len() > 1 && i != v.len() - 1 {
    |                                          ^^^ method not found in `&MoveAction`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `len`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `bevy::reflect::Array`
            candidate #3: `bevy::reflect::List`
            candidate #4: `bevy::reflect::Map`
            candidate #5: `BufferRef`
            candidate #6: `RuntimeSizedArray`
            candidate #7: `core_graphics::data_provider::CustomData`

error[E0599]: no method named `len` found for reference `&MoveAction` in the current scope
   --> /Users/me/.cargo/git/checkouts/bevy_dolly-ae7dd05587c8a08d/dcd1f44/src/helpers/pos_ctrl.rs:149:27
    |
149 |                 if i == v.len() - 1 {
    |                           ^^^ method not found in `&MoveAction`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `len`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `bevy::reflect::Array`
            candidate #3: `bevy::reflect::List`
            candidate #4: `bevy::reflect::Map`
            candidate #5: `BufferRef`
            candidate #6: `RuntimeSizedArray`
            candidate #7: `core_graphics::data_provider::CustomData`
BlackPhlox commented 9 months ago

Hi @rparrett! Thanks for submitting the issue. Issue were also reported here: https://github.com/BlackPhlox/bevy_dolly/pull/40#issuecomment-1837207926 It should be fixed on the branch, specifically here: https://github.com/BlackPhlox/bevy_dolly/commit/7c4885c9d252cea804c9b8f52faff10adcbd8f8f

BlackPhlox commented 9 months ago

Fixed in the latest release (0.0.2)

rparrett commented 9 months ago

Thanks!