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

Broken build #41

Open
fvacek opened this issue Jan 8, 2022 · 0 comments
Open

Broken build #41

fvacek opened this issue Jan 8, 2022 · 0 comments

Comments

@fvacek
Copy link

fvacek commented Jan 8, 2022

Building the master, I've experienced following error

[~/t/pinetime/pinetime-rust-mynewt]$ scripts/build-app.sh                                                                                                                              [broken-build-fixed] 
+ mynewt_build_app=nrf52_my_sensor
+ rust_build_target=thumbv7em-none-eabihf
+ launch_config=launch-nrf52-pi.json
+ set +x

----- Building Rust app and Mynewt OS for thumbv7em-none-eabihf / nrf52_my_sensor...

----- Build Rust app
+ cargo build --target thumbv7em-none-eabihf
    Updating crates.io index
   Compiling app v2.1.1 (/home/fanda/t/pinetime/pinetime-rust-mynewt/rust/app)
error: proc macro panicked
   --> rust/app/src/app_network.rs:98:20
    |
98  |       let _payload = coap!( @json {        
    |  ____________________^
99  | |         //  Create `values` as an array of items under the root.
100 | |         //  Assume `val` contains `key: "t", val: 2870, geo: { lat, long }`. 
101 | |         //  Append to the `values` array the Sensor Key, Value and optional Geolocation:
...   |
107 | |         "device": &device_id,
108 | |     });
    | |______^
    |
    = help: message: index out of bounds: the len is 1 but the index is 1
    = note: this error originates in the macro `$crate::json_rep_set_text_string` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `app` due to 2 previous errors

When I change @json to @cbor build finishes with success, but the app might be broken.

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

No branches or pull requests

1 participant