Compile failure for installation
rnc opened this issue · 8 comments
I am getting:
error[E0004]: non-exhaustive patterns: `&Bytes(_)` not covered
--> /home/rnc/.cargo/registry/src/github.com-1ecc6299db9ec823/keepass-diff-1.0.0/src/diff/entry.rs:24:38
|
24 | value: match v {
| ^ pattern `&Bytes(_)` not covered
|
::: /home/rnc/.cargo/registry/src/github.com-1ecc6299db9ec823/keepass-0.4.7/src/db.rs:327:5
|
327 | Bytes(Vec<u8>),
| ----- not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
= note: the matched value is of type `&keepass::Value`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0004`.
error: failed to compile `keepass-diff v1.0.0`, intermediate artifacts can be found at `/tmp/cargo-install7Xenyd`
Caused by:
could not compile `keepass-diff`.
To learn more, run the command again with --verbose.
running RUSTFLAGS="-C target-cpu=native" cargo install keepass-diff
.
I am using Fedora 32 with Cargo cargo-1.45.2-1.fc32.x86_64
and I checked out this repository from main branch.
+1
Did you try using the 1.0.0 tagged version? I haven't come around to test the stuff that was done in the underlying library (see sseemayer/keepass-rs#25)
Hopefully the tagged version still works?
+1
Even on the 1.0.0 tag. cargo/rust 1.46.0 on Ubuntu.
Edit: Small local fix:
diff --git a/src/diff/entry.rs b/src/diff/entry.rs
index 007dd7d..8c6337f 100644
--- a/src/diff/entry.rs
+++ b/src/diff/entry.rs
@@ -26,6 +26,7 @@ impl Entry {
Value::Protected(p) => String::from_utf8(p.unsecure().to_owned())
.unwrap()
.to_owned(),
+ Value::Bytes(_) => panic!("raw byte values not supported!"),
},
use_verbose,
},
I have the same issue.
I have tried directly on my Mac, then I tried in a VM running Debian Buster. On both setup, I have tried on the release code and on the tag 1.0.0.
I hope it helps.
Why does it show keepass-0.4.7
in the initial posting as there is keepass = "0.4.5"
in the keepass-diff Cargo.toml
? Is the dependency not pinned by that?
I am not really able to look into this right now. If anyone has a pointer or workaround for this, I'd appreciate it.
+1
I was able to compile v0.3.0 using RUSTFLAGS="-C target-cpu=native" cargo build --verbose --all
without a problem. Just the v1.0.0 failed. It appears to be a regression
Should be fixed in 1.0.1
by pinning the version of keepass
to =0.4.5
thanks to @peterjeschke !