cortex-m icon indicating copy to clipboard operation
cortex-m copied to clipboard

New cortex-m-rt doesn't work with Cargo "rename-dependency" feature

Open little-arhat opened this issue 7 years ago • 3 comments

In 2018 edition instead of extern crate cortex_m_rt as rt one would use Cargo rename-dependency:

[dependencies]
rt = {version = "0.6.2", package='cortex-m-rt'}

cortex_m_rt_macros, however, doesn't respect this and still generates code with extern crate cortex_m_rt.

little-arhat avatar Sep 09 '18 12:09 little-arhat

I haven't been following closely but isn't this a known issue? What does e.g. serde-derive do in the case you rename serde to something else?

japaric avatar Sep 09 '18 13:09 japaric

It seems serde_derive also struggles with renames: https://github.com/serde-rs/serde/issues/953. I think there should be at least mention about this behaviour in the doc as currenaly all example in rust-embedded use extern crate cortex_m_rt as rt, and in 2018 this is done via renames.

little-arhat avatar Sep 09 '18 13:09 little-arhat

Is this build failure also an example of this issue?

achan1989 avatar Sep 28 '18 14:09 achan1989