Skip to content

Commit

Permalink
compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Apr 11, 2024
1 parent 3484a07 commit 9888b6b
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 33 deletions.
4 changes: 2 additions & 2 deletions zenoh-ext/src/publication_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::future::Ready;
use std::time::Duration;
use zenoh::core::Error;
use zenoh::core::{AsyncResolve, Resolvable, Resolve, SyncResolve};
use zenoh::internal::ResolveFuture;
use zenoh::internal::{ResolveFuture, TerminatableTask};
use zenoh::key_expr::{keyexpr, KeyExpr, OwnedKeyExpr};
use zenoh::queryable::{Query, Queryable};
use zenoh::runtime::ZRuntime;
Expand Down Expand Up @@ -173,7 +173,7 @@ impl<'a> PublicationCache<'a> {
let token = TerminatableTask::create_cancellation_token();
let token2 = token.clone();
let task = TerminatableTask::spawn(
zenoh_runtime::ZRuntime::Application,
ZRuntime::Application,
async move {
let mut cache: HashMap<OwnedKeyExpr, VecDeque<Sample>> =
HashMap::with_capacity(resources_limit.unwrap_or(32));
Expand Down
11 changes: 0 additions & 11 deletions zenoh/src/api/queryable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ use super::{
};
use crate::net::primitives::Primitives;
use std::{fmt, future::Ready, ops::Deref, sync::Arc};
use crate::prelude::*;
use crate::sample::builder::SampleBuilder;
use crate::sample::QoSBuilder;
#[cfg(feature = "unstable")]
use crate::sample::SourceInfo;
use crate::Id;
use crate::SessionRef;
use crate::Undeclarable;
#[cfg(feature = "unstable")]
use crate::{query::ReplyKeyExpr, sample::Attachment};
use std::fmt;
use uhlc::Timestamp;
use zenoh_core::{AsyncResolve, Resolvable, Resolve, SyncResolve};
use zenoh_protocol::{
Expand Down
6 changes: 0 additions & 6 deletions zenoh/src/api/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ use zenoh_protocol::{
pub use attachment::{Attachment, AttachmentBuilder, AttachmentIterator};
#[zenoh_macros::unstable]
use serde::Serialize;
use std::{convert::TryFrom, fmt};
use zenoh_protocol::core::CongestionControl;
use zenoh_protocol::core::EntityGlobalId;
use zenoh_protocol::network::declare::ext::QoSType;

pub mod builder;

pub type SourceSn = u64;

Expand Down
1 change: 0 additions & 1 deletion zenoh/src/api/scouting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//
use crate::api::handlers::{locked, Callback, DefaultHandler, IntoHandler};
use crate::net::runtime::{orchestrator::Loop, Runtime};
use futures::StreamExt;
use std::time::Duration;
use std::{fmt, future::Ready, net::SocketAddr, ops::Deref};
use tokio::net::UdpSocket;
Expand Down
10 changes: 2 additions & 8 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ use zenoh_config::{unwrap_or_default, Config, Notifier};
use zenoh_core::{
zconfigurable, zread, Resolvable, Resolve, ResolveClosure, ResolveFuture, SyncResolve,
};
use zenoh_config::unwrap_or_default;
use zenoh_core::{zconfigurable, zread, Resolve, ResolveClosure, ResolveFuture, SyncResolve};
#[cfg(feature = "unstable")]
use zenoh_protocol::network::{declare::SubscriberId, ext};
use zenoh_protocol::{
Expand Down Expand Up @@ -80,16 +78,12 @@ use zenoh_task::TaskController;
use zenoh_util::core::AsyncResolve;

#[cfg(feature = "unstable")]
use {
super::{
use super::{
liveliness::{Liveliness, LivelinessTokenState},
publication::Publisher,
publication::{MatchingListenerState, MatchingStatus},
sample::{Attachment, SourceInfo},
},
zenoh_protocol::network::declare::SubscriberId,
zenoh_protocol::network::ext,
};
};

zconfigurable! {
pub(crate) static ref API_DATA_RECEPTION_CHANNEL_SIZE: usize = 256;
Expand Down
3 changes: 3 additions & 0 deletions zenoh/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ pub mod value {
/// Encoding support
pub mod encoding {
pub use crate::api::encoding::Encoding;
pub use crate::api::encoding::EncodingBuilder;
}

/// Payload primitives
Expand Down Expand Up @@ -256,6 +257,7 @@ pub mod subscriber {
/// Publishing primitives
pub mod publication {
pub use crate::api::builders::publication::PublisherBuilder;
#[zenoh_macros::unstable]
pub use crate::api::publication::MatchingListener;
pub use crate::api::publication::Priority;
pub use crate::api::publication::Publisher;
Expand Down Expand Up @@ -349,6 +351,7 @@ pub mod internal {
pub use zenoh_util::core::ResolveFuture;
pub use zenoh_util::LibLoader;
pub use zenoh_util::{zenoh_home, Timed, TimedEvent, Timer, ZENOH_HOME_ENV_VAR};
pub use zenoh_task::TerminatableTask;
}

#[cfg(feature = "shared-memory")]
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/hat/linkstate_peer/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::net::codec::Zenoh080Routing;
use crate::net::protocol::linkstate::{LinkState, LinkStateList};
use crate::net::routing::dispatcher::tables::NodeId;
use crate::net::runtime::Runtime;
use crate::runtime::WeakRuntime;
use crate::net::runtime::WeakRuntime;
use petgraph::graph::NodeIndex;
use petgraph::visit::{VisitMap, Visitable};
use std::convert::TryInto;
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/hat/p2p_peer/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use crate::net::codec::Zenoh080Routing;
use crate::net::protocol::linkstate::{LinkState, LinkStateList};
use crate::net::runtime::Runtime;
use crate::runtime::WeakRuntime;
use crate::net::runtime::WeakRuntime;
use petgraph::graph::NodeIndex;
use std::convert::TryInto;
use vec_map::VecMap;
Expand Down
6 changes: 3 additions & 3 deletions zenoh/tests/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ async fn open_session_unicast_runtime(endpoints: &[&str]) -> (Runtime, Runtime)
async fn zenoh_2sessions_1runtime_init() {
let (r1, r2) = open_session_unicast_runtime(&["tcp/127.0.0.1:17449"]).await;
println!("[RI][02a] Creating peer01 session from runtime 1");
let peer01 = zenoh::init(r1.clone()).res_async().await.unwrap();
let peer01 = zenoh::session::init(r1.clone()).res_async().await.unwrap();
println!("[RI][02b] Creating peer02 session from runtime 2");
let peer02 = zenoh::init(r2.clone()).res_async().await.unwrap();
let peer02 = zenoh::session::init(r2.clone()).res_async().await.unwrap();
println!("[RI][02c] Creating peer01a session from runtime 1");
let peer01a = zenoh::init(r1.clone()).res_async().await.unwrap();
let peer01a = zenoh::session::init(r1.clone()).res_async().await.unwrap();
println!("[RI][03c] Closing peer01a session");
std::mem::drop(peer01a);
test_session_pubsub(&peer01, &peer02, Reliability::Reliable).await;
Expand Down

0 comments on commit 9888b6b

Please sign in to comment.