jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

unresolved import `rtic::cyccnt` #179

Closed MarkSwanson closed 3 years ago

MarkSwanson commented 3 years ago

$ git clone rubble $ cargo build --features 52840 error[E0432]: unresolved import rtic::cyccnt --> demos/nrf52-beacon/src/main.rs:24:11 | 24 | use rtic::cyccnt::U32Ext; | ^^^^^^ could not find cyccnt in rtic

The problem seems to be a bug in cargo. Cargo doesn't seem to be giving each workspace member its own dependency graph.

One solution is to just exclude demos/nrf52-beacon from the workspace. This adds a step in that you have to build demos/nrf52-beacon separately, but at least everything will compile. You will lose vscode integration for demos/nrf52-beacon as well...

$ git diff diff --git a/Cargo.toml b/Cargo.toml index 6afcfdc..7b40396 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,11 @@ members = [ "rubble-nrf5x", "rubble-tests", "rubble-docs",

MarkSwanson commented 3 years ago

Closing because this isn't a bug in rubble - I just wanted to paste this here in case it saves someone some time.