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

Update riscv dependency version #10

Merged

Conversation

chemicstry
Copy link
Contributor

@chemicstry chemicstry commented Sep 7, 2020

This updates riscv dependency version and resolves bare-metal conflict when building for stm32:

error: failed to select a version for `bare-metal`.
    ... required by package `stm32f4xx-hal v0.8.0`
    ... which is depended on by `gimbal-ctrl v0.1.0 (C:\Users\User\Documents\Dev\gimbal-ctrl)`
versions that meet the requirements `^0.2.5` are: 0.2.5

all possible versions conflict with previously selected packages.

  previously selected package `bare-metal v0.2.1`
    ... which is depended on by `riscv v0.5.6`
    ... which is depended on by `async-embedded v0.0.0-alpha.0 (https://github.com/rust-embedded-community/async-on-embedded?rev=5609a9d#5609a9d2)`
    ... which is depended on by `gimbal-ctrl v0.1.0 (C:\Users\User\Documents\Dev\gimbal-ctrl)`

failed to select a version for `bare-metal` which could resolve this conflict

This is a problem because cargo selects versions with all cfg(...) macros evaluated to true, so even if not building for riscv arch, it fails to select proper bare-metal version.

@chemicstry
Copy link
Contributor Author

I've also hit another similar problem where memchr fails to build because riscv has it as a build dependency and forces std feature flag. This can be resolved with an unstable cargo feature rust-lang/cargo#7915 which isolates regular and build dependency feature flags.

Copy link
Member

@Disasm Disasm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@Disasm Disasm merged commit aa43ccd into rust-embedded-community:master Sep 22, 2020
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

Successfully merging this pull request may close these issues.

2 participants