Open pdgilbert opened 3 years ago
Yeah, it would be good to improve this. I think it's mostly up to defmt and Cargo to provide better handling of dependencies that use links
here, see https://github.com/knurling-rs/defmt/issues/426 and https://github.com/rust-lang/cargo/issues/7880.
Ok, I see the defmt
issue is a bit messy. But I think crates using bxcan
can help by specifying bxcan = ">=0.4"
rather than `bxcan = "=0.5.0" ? Could you at least change the README.md?
I've opened https://github.com/stm32-rs/bxcan/pull/35 to make defmt support opt-in, and to allow patch versions of bxcan to update defmt (which normally would be considered a breaking change). This should lift some of the burden from HALs, since they no longer need to update to a new breaking bxcan release every time a new defmt version comes out.
Naturally, the drawback is that the defmt version may change, so that means that mostly only applications (which check in their lockfile) would want to use the defmt feature.
I am building some things that work with multiple device crates and have just started getting
cargo update
errors because one crate has updatebxcan
while another has not:It seems that
bxcan
demands a specific version ofdefmt
and also in theREADME.md
usage suggests demanding a specific version ofbxcan
(nowbxcan = "0.5.0"
but I see it is updated automatically).Any chance you can be more flexible by depending on
defmt = "^..."
or">=..."
and suggest similar flexibility regardingbxcan
in yourREADME
?