Update peach-lib dependencies and error printing #3

Merged
glyph merged 4 commits from fix_failing_build into main 2021-10-26 12:38:03 +00:00
Owner

This PR updates the peach-lib dependency for peach-probe and peach-menu (using a path and not a git URL).

I also updated some error printing for peach-probe.

@notplants Could you please checkout this branch and help me to solve the error in peach-probe? I think something might have broken when snafu errors were introduced to peach-lib, but I'm not yet sure.

error[E0599]: no method named `kind` found for struct `peach_lib::jsonrpc_core::Error` in the current scope
   --> peach-probe/src/probe.rs:217:35
    |
217 |                         match err.kind() {
    |                                   ^^^^ method not found in `peach_lib::jsonrpc_core::Error`

It will take me some time to wrap my head around snafu error-handling again :/

This PR updates the `peach-lib` dependency for `peach-probe` and `peach-menu` (using a `path` and not a `git` URL). I also updated some error printing for `peach-probe`. @notplants Could you please checkout this branch and help me to solve the error in `peach-probe`? I think something might have broken when `snafu` errors were introduced to `peach-lib`, but I'm not yet sure. ``` error[E0599]: no method named `kind` found for struct `peach_lib::jsonrpc_core::Error` in the current scope --> peach-probe/src/probe.rs:217:35 | 217 | match err.kind() { | ^^^^ method not found in `peach_lib::jsonrpc_core::Error` ``` It will take me some time to wrap my head around `snafu` error-handling again :/
glyph added 1 commit 2021-10-25 14:11:39 +00:00
glyph added the
bug
label 2021-10-25 14:11:52 +00:00
glyph added 1 commit 2021-10-25 14:29:27 +00:00
Author
Owner

I found a solution for the aforementioned bug in the error assertion code. snafu is a bit of a nightmare 0_o Would love to revamp that at some point but I'm doing my best not to get stuck on that now :)

I have one more error to fix (in peach-oled) and then this PR will be ready for review.

I found a solution for the aforementioned bug in the error assertion code. `snafu` is a bit of a nightmare 0_o Would love to revamp that at some point but I'm doing my best not to get stuck on that now :) I have one more error to fix (in `peach-oled`) and then this PR will be ready for review.
glyph added 1 commit 2021-10-25 16:35:20 +00:00
glyph added 1 commit 2021-10-25 16:43:06 +00:00
glyph requested review from notplants 2021-10-25 16:43:24 +00:00
Author
Owner

This is now ready for review :)

I haven't done any major refactors. My goal here was simply to get the entire workspace to pass cargo check and cargo test.

This is now ready for review :) I haven't done any major refactors. My goal here was simply to get the entire workspace to pass `cargo check` and `cargo test`.
notplants approved these changes 2021-10-26 12:31:29 +00:00
notplants left a comment
Owner

I now see the "review" part of gitea, where you can click approve.

LGTM.

getting everything to pass cargo check and cargo test for the workspace sounds like a good baseline.

just one rfc about a possibly erroneous commented line

I now see the "review" part of gitea, where you can click approve. LGTM. getting everything to pass cargo check and cargo test for the workspace sounds like a good baseline. just one rfc about a possibly erroneous commented line
@ -248,3 +248,3 @@
use hal::i2cdev::linux::LinuxI2CError;
use jsonrpc_core::ErrorCode;
use nix::Error as NixError;
//use nix::Error as NixError;
Owner

should this line just be deleted instead of commented out?

should this line just be deleted instead of commented out?
Author
Owner

Good spotting! I'm going to leave that one commented out for now, since it relates to the commented out test below it (test to ensure correct I2CError error response (nix::Error variant)). I've added a TODO comment there to remind myself to fix it when I circle back to working on the physical interface .

Good spotting! I'm going to leave that one commented out for now, since it relates to the commented out test below it (`test to ensure correct I2CError error response (nix::Error variant)`). I've added a `TODO` comment there to remind myself to fix it when I circle back to working on the physical interface .
glyph marked this conversation as resolved
Author
Owner

Wicked, thanks for the review! I'm really enjoying the Gitea interface.

Wicked, thanks for the review! I'm really enjoying the Gitea interface.
glyph merged commit 9225f32a5f into main 2021-10-26 12:38:03 +00:00
glyph deleted branch fix_failing_build 2021-10-26 12:38:12 +00:00
Sign in to join this conversation.
No description provided.