Skip to content

Broken build #41

Open
Open
@fvacek

Description

@fvacek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions