From e83c242a9679a7bf4866a165a115e542ac0e8be5 Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Thu, 12 Sep 2024 18:19:40 +0200 Subject: [PATCH] chore: update zenoh version --- zenoh-jni/Cargo.lock | 53 +++++++++++++++++++------------------- zenoh-jni/src/queryable.rs | 2 +- zenoh-jni/src/session.rs | 47 ++++++++++++++++----------------- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/zenoh-jni/Cargo.lock b/zenoh-jni/Cargo.lock index 2b5cd9288..f1d95bb05 100644 --- a/zenoh-jni/Cargo.lock +++ b/zenoh-jni/Cargo.lock @@ -2866,7 +2866,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "ahash", "async-trait", @@ -2915,7 +2915,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "zenoh-collections", ] @@ -2923,7 +2923,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "tracing", "uhlc", @@ -2934,12 +2934,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" [[package]] name = "zenoh-config" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "flume 0.11.0", "json5", @@ -2961,7 +2961,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "lazy_static", "tokio", @@ -2972,7 +2972,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "aes", "hmac", @@ -2985,7 +2985,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "bincode", "flume 0.11.0", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "hashbrown 0.14.5", "keyed-set", @@ -3015,7 +3015,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -3032,7 +3032,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "flume 0.11.0", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "base64 0.22.1", @@ -3080,7 +3080,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "socket2", @@ -3097,7 +3097,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "base64 0.22.1", @@ -3124,7 +3124,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "socket2", @@ -3143,7 +3143,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "nix", @@ -3161,7 +3161,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "futures-util", @@ -3181,7 +3181,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "proc-macro2", "quote", @@ -3192,7 +3192,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "git-version", "libloading", @@ -3207,7 +3207,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "const_format", "rand", @@ -3221,7 +3221,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "anyhow", ] @@ -3229,7 +3229,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "lazy_static", "ron", @@ -3242,7 +3242,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "event-listener", "futures", @@ -3255,7 +3255,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "futures", "tokio", @@ -3268,7 +3268,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "crossbeam-utils", @@ -3301,7 +3301,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.0.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#a2eaf2e2698b69e32ff41642f5acd9888d9222ba" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#b3ded09418aac568fb389ee1a87722b7744adef7" dependencies = [ "async-trait", "const_format", @@ -3339,7 +3339,6 @@ dependencies = [ "uhlc", "zenoh", "zenoh-ext", - "zenoh-protocol", ] [[package]] diff --git a/zenoh-jni/src/queryable.rs b/zenoh-jni/src/queryable.rs index 07ed6e1b4..5d2ddb1d2 100644 --- a/zenoh-jni/src/queryable.rs +++ b/zenoh-jni/src/queryable.rs @@ -35,7 +35,7 @@ use zenoh::query::Queryable; pub(crate) unsafe extern "C" fn Java_io_zenoh_jni_JNIQueryable_freePtrViaJNI( _env: JNIEnv, _: JClass, - queryable_ptr: *const Queryable<'_, ()>, + queryable_ptr: *const Queryable<()>, ) { Arc::from_raw(queryable_ptr); } diff --git a/zenoh-jni/src/session.rs b/zenoh-jni/src/session.rs index 9eaea3d79..7f5412a9f 100644 --- a/zenoh-jni/src/session.rs +++ b/zenoh-jni/src/session.rs @@ -12,26 +12,27 @@ // ZettaScale Zenoh Team, // -use crate::errors::Result; -use crate::key_expr::process_kotlin_key_expr; -use crate::{jni_error, utils::*}; -use crate::{session_error, throw_exception}; +use std::{mem, ops::Deref, ptr::null, sync::Arc, time::Duration}; -use jni::objects::{GlobalRef, JByteArray, JClass, JObject, JString, JValue}; -use jni::sys::{jboolean, jint, jlong}; -use jni::JNIEnv; -use std::mem; -use std::ops::Deref; -use std::ptr::null; -use std::sync::Arc; -use std::time::Duration; -use zenoh::config::{Config, ZenohId}; -use zenoh::key_expr::KeyExpr; -use zenoh::prelude::Wait; -use zenoh::pubsub::{Publisher, Subscriber}; -use zenoh::query::{Query, Queryable, ReplyError, Selector}; -use zenoh::sample::Sample; -use zenoh::session::{Session, SessionDeclarations}; +use jni::{ + objects::{GlobalRef, JByteArray, JClass, JObject, JString, JValue}, + sys::{jboolean, jint, jlong}, + JNIEnv, +}; +use zenoh::{ + config::{Config, ZenohId}, + key_expr::KeyExpr, + prelude::Wait, + pubsub::{Publisher, Subscriber}, + query::{Query, Queryable, ReplyError, Selector}, + sample::Sample, + session::Session, +}; + +use crate::{ + errors::Result, jni_error, key_expr::process_kotlin_key_expr, session_error, throw_exception, + utils::*, +}; /// Open a Zenoh session via JNI. /// @@ -444,9 +445,9 @@ pub unsafe extern "C" fn Java_io_zenoh_jni_JNISession_declareSubscriberViaJNI( session_ptr: *const Session, callback: JObject, on_close: JObject, -) -> *const Subscriber<'static, ()> { +) -> *const Subscriber<()> { let session = Arc::from_raw(session_ptr); - || -> Result<*const Subscriber<'static, ()>> { + || -> Result<*const Subscriber<()>> { let java_vm = Arc::new(get_java_vm(&mut env)?); let callback_global_ref = get_callback_global_ref(&mut env, callback)?; let on_close_global_ref = get_callback_global_ref(&mut env, on_close)?; @@ -572,9 +573,9 @@ pub unsafe extern "C" fn Java_io_zenoh_jni_JNISession_declareQueryableViaJNI( callback: JObject, on_close: JObject, complete: jboolean, -) -> *const Queryable<'static, ()> { +) -> *const Queryable<()> { let session = Arc::from_raw(session_ptr); - let query_ptr = || -> Result<*const Queryable<'static, ()>> { + let query_ptr = || -> Result<*const Queryable<()>> { let java_vm = Arc::new(get_java_vm(&mut env)?); let callback_global_ref = get_callback_global_ref(&mut env, callback)?; let on_close_global_ref = get_callback_global_ref(&mut env, on_close)?;