atsamd icon indicating copy to clipboard operation
atsamd copied to clipboard

fix: Update feather_m0 usb-device crate.

Open wt opened this issue 2 months ago • 5 comments

This crate needs to be the same as the atsamd-hal, which uses version 0.3.2.

Summary

I updated the usb-device dependency of the feather_m0 support crate to match the version used in atsamd-hal.

Checklist

  • [X] All new or modified code is well documented, especially public items
  • [X] No new warnings or clippy suggestions have been introduced - CI will deny clippy warnings by default! You may #[allow] certain lints where reasonable, but ideally justify those with a short comment.

wt avatar Nov 12 '25 22:11 wt

Why would this be necessary? Cargo should auto-pull the latest patch version of any dependency...or did USB-Device break the API in a patch version?

rnd-ash avatar Nov 17 '25 08:11 rnd-ash

Why would this be necessary? Cargo should auto-pull the latest patch version of any dependency...or did USB-Device break the API in a patch version?

Yeah, I have this question as well

jbeaurivage avatar Nov 17 '25 09:11 jbeaurivage

When I was building stuff I saw warnings about different versions of deps in the dependency tree. It might be better to make the dev deps for the examples use a * version for most of their deps, I think they would then just match whatever is used in other parts of the dep tree.

Again, I was just trying to get rid of the warning. I know rust will not see the data structures from different versions of crates as different. I just figured that probably wasn't good for binary size.

wt avatar Nov 17 '25 18:11 wt

@wt if you run cargo update from within your project, it should pull the latest patch versions of every dependency in the tree.

Out of interest, what kind of warnings do you get? - I haven't seen warnings before related to different crate versions...

rnd-ash avatar Nov 18 '25 06:11 rnd-ash

I was matching the dep from the hal crate's Cargo.toml:

usb-device = {version = "0.3.2", optional = true}

wt avatar Nov 18 '25 10:11 wt