From ba003da52a6a895d4c04af586cb5de3db7010214 Mon Sep 17 00:00:00 2001 From: Joseph Perez Date: Fri, 28 Jun 2024 15:09:27 +0200 Subject: [PATCH] chore: bump zenoh version --- .github/workflows/ci.yml | 3 +-- .pre-commit-config.yaml | 17 +++++++++++++ Cargo.lock | 52 ++++++++++++++++++++-------------------- Cargo.toml | 8 +++---- src/lib.rs | 27 +++++++++++---------- 5 files changed, 62 insertions(+), 45 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89168a6..767d9c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,8 +50,7 @@ jobs: rustup component add rustfmt clippy - name: Code format check - run: cargo fmt --check - + run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate" - name: Clippy run: cargo clippy --all --examples -- -D warnings diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9299cb4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,17 @@ +repos: + - repo: local + hooks: + - id: fmt + name: fmt + entry: cargo fmt -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate" + language: system + types: [rust] + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.4.2 + hooks: + - id: black + args: [-C] \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 0c2c593..c9027b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3247,7 +3247,7 @@ dependencies = [ [[package]] name = "zenoh" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "ahash", "async-trait", @@ -3321,7 +3321,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "zenoh-collections", ] @@ -3329,7 +3329,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "serde", "tracing", @@ -3341,12 +3341,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" [[package]] name = "zenoh-config" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "flume", "json5", @@ -3368,7 +3368,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-global-executor", "lazy_static", @@ -3380,7 +3380,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "aes", "hmac", @@ -3393,7 +3393,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "hashbrown", "keyed-set", @@ -3407,7 +3407,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "zenoh-config", @@ -3425,7 +3425,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "flume", @@ -3449,7 +3449,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "base64 0.22.1", @@ -3480,7 +3480,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "tokio", @@ -3498,7 +3498,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "base64 0.22.1", @@ -3528,7 +3528,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "socket2 0.5.6", @@ -3549,7 +3549,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "futures", @@ -3569,7 +3569,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "futures-util", @@ -3590,7 +3590,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "proc-macro2", "quote", @@ -3601,7 +3601,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "libloading", "serde", @@ -3616,7 +3616,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "const_format", "rand", @@ -3631,7 +3631,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "anyhow", ] @@ -3639,7 +3639,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "futures", "lazy_static", @@ -3654,7 +3654,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "event-listener 5.3.1", "futures", @@ -3668,7 +3668,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "futures", "tokio", @@ -3681,7 +3681,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-trait", "flume", @@ -3713,7 +3713,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-std", "async-trait", @@ -3737,7 +3737,7 @@ dependencies = [ [[package]] name = "zenoh_backend_traits" version = "0.11.0-dev" -source = "git+https://github.com/eclipse-zenoh/zenoh?branch=dev/1.0.0#1790d59d1a9aa4995b3997f6fa96e90b24d28a25" +source = "git+https://github.com/ZettaScaleLabs/zenoh?branch=pubsub_query#40906aafd94e22f3cd26b4bf9b4f0e49cb604d10" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 4e306f8..e17cf44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,14 +46,14 @@ rocksdb = "0.22.0" serde_json = "1.0.114" tracing = "0.1" uhlc = "0.7.0" -zenoh = { git = "https://github.com/eclipse-zenoh/zenoh", branch = "dev/1.0.0", features = [ +zenoh = { git = "https://github.com/ZettaScaleLabs/zenoh", branch = "pubsub_query", features = [ "unstable", "internal", "plugins" ] } -zenoh_backend_traits = { git = "https://github.com/eclipse-zenoh/zenoh", branch = "dev/1.0.0" } -zenoh-plugin-trait = { git = "https://github.com/eclipse-zenoh/zenoh", branch = "dev/1.0.0" } -zenoh-codec = { git = "https://github.com/eclipse-zenoh/zenoh", branch = "dev/1.0.0" } +zenoh_backend_traits = { git = "https://github.com/ZettaScaleLabs/zenoh", branch = "pubsub_query" } +zenoh-plugin-trait = { git = "https://github.com/ZettaScaleLabs/zenoh", branch = "pubsub_query" } +zenoh-codec = { git = "https://github.com/ZettaScaleLabs/zenoh", branch = "pubsub_query" } [build-dependencies] rustc_version = "0.4.0" diff --git a/src/lib.rs b/src/lib.rs index 50c7d3c..f4f0add 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,24 +12,25 @@ // ZettaScale Zenoh Team, // +use std::{borrow::Cow, collections::HashMap, path::PathBuf, time::Duration}; + use async_std::sync::{Arc, Mutex}; use async_trait::async_trait; use rocksdb::{ColumnFamilyDescriptor, Options, WriteBatch, DB}; -use std::borrow::Cow; -use std::collections::HashMap; -use std::path::PathBuf; -use std::time::Duration; use tracing::{debug, error, trace, warn}; use uhlc::NTP64; -use zenoh::bytes::ZBytes; -use zenoh::encoding::Encoding; -use zenoh::internal::{bail, zenoh_home, zerror, Value}; -use zenoh::key_expr::OwnedKeyExpr; -use zenoh::selector::Parameters; -use zenoh::time::{new_timestamp, Timestamp}; -use zenoh::{try_init_log_from_env, Error, Result as ZResult}; -use zenoh_backend_traits::config::{StorageConfig, VolumeConfig}; -use zenoh_backend_traits::*; +use zenoh::{ + bytes::{Encoding, ZBytes}, + internal::{bail, zenoh_home, zerror, Value}, + key_expr::OwnedKeyExpr, + query::Parameters, + time::{new_timestamp, Timestamp}, + try_init_log_from_env, Error, Result as ZResult, +}; +use zenoh_backend_traits::{ + config::{StorageConfig, VolumeConfig}, + *, +}; use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin}; /// The environement variable used to configure the root of all storages managed by this RocksdbBackend.