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

Old versions fail to build since 0.8 released [fixed] [readme] #73

Closed
andrewdavidmackenzie opened this issue Jul 17, 2024 · 3 comments
Closed

Comments

@andrewdavidmackenzie
Copy link

Getting this failure, via another dependency:

   Compiling usbd-hid-macros v0.6.0
   Compiling embedded-storage-async v0.4.1
error[E0277]: the trait bound `usbd_hid_descriptors::MainItemKind: From<std::string::String>` is not satisfied
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/usbd-hid-macros-0.6.0/src/spec.rs:512:43
    |
512 |             self.set_item(name, item_kind.into(), settings, bits, quirks);
    |                                           ^^^^ the trait `From<std::string::String>` is not implemented for `usbd_hid_descriptors::MainItemKind`, which is required by `std::string::String: Into<_>`
    |
    = help: the trait `From<&str>` is implemented for `usbd_hid_descriptors::MainItemKind`
    = help: for that trait implementation, expected `&str`, found `std::string::String`
    = note: required for `std::string::String` to implement `Into<usbd_hid_descriptors::MainItemKind>`

   Compiling service-manager v0.6.2
For more information about this error, try `rustc --explain E0277`.
error: could not compile `usbd-hid-macros` (lib) due to 1 previous error

in my daily GH Action:

https://github.com/andrewdavidmackenzie/pingr/actions/runs/9961190117/job/27522157317#step:6:491

@twitchyliquid64
Copy link
Owner

I wrote the first version of this in 2020, in the first few months of writing Rust, and foolishly put the >= specifier on the inter-crate version specifiers. This exploded a few days ago when the macros crate was no longer compatible with all older versions.

I don't really know a way to fix this without everyone upgrading to usbd-hid 0.8 :(

If anyone has any ideas for how to fix this for the 0.6 or 0.7 series please let me know. Sorry again.

@andrewdavidmackenzie
Copy link
Author

My particular problem will be solved by a.version update "upstream" in embasy-usb-logger.....

@twitchyliquid64 twitchyliquid64 changed the title Build failure since 2 days Old versions fail to build since 0.8 released Jul 19, 2024
@twitchyliquid64 twitchyliquid64 changed the title Old versions fail to build since 0.8 released Old versions fail to build since 0.8 released [fixed] [readme] Jul 19, 2024
@twitchyliquid64
Copy link
Owner

twitchyliquid64 commented Jul 19, 2024

To everyone following along, heres how to fix your build:

  1. If you can, use the 0.8 series. 0.8.2 specifically at time of writing.
  2. If you can't, use a patch for the 0.6 or 0.7 series. Those are either: 0.6.2 or 0.7.1.

Sorry about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants