Closed kauron closed 1 year ago
Hello there! Do you mean that the current libstrophe
v0.16.x
has different APIs than those implemented in Vigil, therefore leading to failing compilation?
Yes, exactly. There are some changes that I don't understand due to lack of knowledge of Rust, so I couldn't fix them all.
Working for me using libstrophe 0.12.2 from Homebrew on macOS, w/ the following environment variable set during the build of Vigil:
export RUSTFLAGS="-L /opt/homebrew/Cellar/libstrophe/0.12.2/lib/"
cargo run --all-features
Should work w/o passing the library path on Linux systems w/ libstrophe installed.
It seems that
src/notifier/xmpp.rs
is outdated w.r.t. thetime
andlibstrophe
libraries.With my limited Rust knowledge, I created a patch, but there are still errors that escape my comprehension. Can anyone help me complete this fix?
Patch
```patch @@ -5,8 +5,7 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use std::sync::RwLock; -use std::time::Duration; -use time; +use std::time::{SystemTime, UNIX_EPOCH, Duration}; use libstrophe::{Connection, ConnectionEvent, Context, Stanza, StreamError}; @@ -46,13 +45,16 @@ _error: i32, _stream_error: OptionError
* Vigil version: 1.22.5 * Apply patch and run: `cargo build --frozen --release --all-features` * Rust version: 1.59.0 * Error: ``` error[E0593]: closure is expected to take 3 arguments, but it takes 5 arguments --> src/notifier/xmpp.rs:99:83 | 42 | let fn_handle = |context: &Context, | _____________________________- 43 | | connection: &mut Connection, 44 | | event: ConnectionEvent, 45 | | _error: i32, 46 | | _stream_error: Option