update dependencies

This commit is contained in:
Nikita Vilunov 2024-06-18 14:26:39 +02:00
parent c0aaa26010
commit 3476f2e367
14 changed files with 507 additions and 213 deletions

693
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ tokio = { version = "1.24.1", features = ["full"] } # async runtime
futures-util = "0.3.25" futures-util = "0.3.25"
anyhow = "1.0.68" # error utils anyhow = "1.0.68" # error utils
nonempty = "0.10.0" nonempty = "0.10.0"
quick-xml = { version = "0.31.0", features = ["async-tokio"] } quick-xml = { version = "0.32.0", features = ["async-tokio"] }
lazy_static = "1.4.0" lazy_static = "1.4.0"
regex = "1.7.1" regex = "1.7.1"
derive_more = "0.99.17" derive_more = "0.99.17"
@ -33,6 +33,7 @@ tracing-subscriber = "0.3.16"
sasl = { path = "crates/sasl" } sasl = { path = "crates/sasl" }
chrono = "0.4.37" chrono = "0.4.37"
reqwest = { version = "0.12.0", default-features = false, features = ["json"] } reqwest = { version = "0.12.0", default-features = false, features = ["json"] }
opentelemetry = "0.22.0"
[package] [package]
name = "lavina" name = "lavina"
@ -60,7 +61,7 @@ projection-irc = { path = "crates/projection-irc" }
projection-xmpp = { path = "crates/projection-xmpp" } projection-xmpp = { path = "crates/projection-xmpp" }
mgmt-api = { path = "crates/mgmt-api" } mgmt-api = { path = "crates/mgmt-api" }
clap.workspace = true clap.workspace = true
opentelemetry = "0.22.0" opentelemetry.workspace = true
opentelemetry-semantic-conventions = "0.14.0" opentelemetry-semantic-conventions = "0.14.0"
opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"] } opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"] }
opentelemetry-otlp = "0.15.0" opentelemetry-otlp = "0.15.0"

View File

@ -15,6 +15,6 @@ argon2 = { version = "0.5.3" }
rand_core = { version = "0.6.4", features = ["getrandom"] } rand_core = { version = "0.6.4", features = ["getrandom"] }
reqwest.workspace = true reqwest.workspace = true
reqwest-middleware = { version = "0.3", features = ["json"] } reqwest-middleware = { version = "0.3", features = ["json"] }
opentelemetry = "0.22.0" opentelemetry.workspace = true
mgmt-api = { path = "../mgmt-api" } mgmt-api = { path = "../mgmt-api" }
reqwest-tracing = { version = "0.5", features = ["opentelemetry_0_22"] } reqwest-tracing = { version = "0.5", features = ["opentelemetry_0_22"] }

View File

@ -27,6 +27,7 @@ impl FromXml for IqClientBody {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let bytes = match event { let bytes = match event {
Event::Start(bytes) => bytes, Event::Start(bytes) => bytes,
@ -62,6 +63,7 @@ impl FromXml for ClientPacket {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
match event { match event {
Event::Start(bytes) | Event::Empty(bytes) => { Event::Start(bytes) | Event::Empty(bytes) => {

View File

@ -83,6 +83,7 @@ impl FromXml for BindRequest {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut resource: Option<Str> = None; let mut resource: Option<Str> = None;
let Event::Start(bytes) = event else { let Event::Start(bytes) = event else {

View File

@ -566,6 +566,7 @@ impl<T: FromXml> FromXml for Presence<T> {
type P = impl Parser<Output = Result<Presence<T>>>; type P = impl Parser<Output = Result<Presence<T>>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let (bytes, end) = match event { let (bytes, end) = match event {
Event::Start(bytes) => (bytes, false), Event::Start(bytes) => (bytes, false),

View File

@ -21,6 +21,7 @@ impl FromXml for InfoQuery {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut node = None; let mut node = None;
let mut identity = vec![]; let mut identity = vec![];
@ -141,6 +142,7 @@ impl FromXml for Identity {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut category = None; let mut category = None;
let mut name = None; let mut name = None;
@ -209,6 +211,7 @@ impl FromXml for Feature {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut var = None; let mut var = None;
let (bytes, end) = match event { let (bytes, end) = match event {
@ -258,6 +261,7 @@ impl FromXml for ItemQuery {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut item = vec![]; let mut item = vec![];
let (_, end) = match event { let (_, end) = match event {
@ -342,6 +346,7 @@ impl FromXml for Item {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(_, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(_, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut jid = None; let mut jid = None;
let mut name = None; let mut name = None;

View File

@ -65,6 +65,7 @@ impl FromXml for X {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
println!("X::parse {:?}", event); println!("X::parse {:?}", event);
@ -126,6 +127,7 @@ impl FromXml for MessageArchiveRequest {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
println!("MessageArchiveRequest::parse {:?}", event); println!("MessageArchiveRequest::parse {:?}", event);

View File

@ -23,6 +23,7 @@ impl FromXml for History {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut history = History::default(); let mut history = History::default();
let (bytes, end) = match event { let (bytes, end) = match event {
@ -77,6 +78,7 @@ impl FromXml for Password {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let bytes = match event { let bytes = match event {
Event::Start(bytes) if bytes.name().0 == Self::NAME.as_bytes() => bytes, Event::Start(bytes) if bytes.name().0 == Self::NAME.as_bytes() => bytes,
@ -112,6 +114,7 @@ impl FromXml for X {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut res = X::default(); let mut res = X::default();
let (_, end) = match event { let (_, end) = match event {

View File

@ -13,6 +13,7 @@ impl FromXml for RosterQuery {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let ResolveResult::Bound(Namespace(ns)) = namespace else { let ResolveResult::Bound(Namespace(ns)) = namespace else {
return Err(anyhow!("No namespace provided")); return Err(anyhow!("No namespace provided"));

View File

@ -13,6 +13,7 @@ impl FromXml for Session {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
match event { match event {
Event::Start(_) => (), Event::Start(_) => (),

View File

@ -7,6 +7,7 @@ impl FromXml for Ignore {
type P = impl Parser<Output = Result<Self>>; type P = impl Parser<Output = Result<Self>>;
fn parse() -> Self::P { fn parse() -> Self::P {
#[coroutine]
|(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
let mut depth = match event { let mut depth = match event {
Event::Start(bytes) => 0, Event::Start(bytes) => 0,

View File

@ -28,6 +28,7 @@ pub use ignore::Ignore;
/// type P = impl Parser<Output = Result<Self>>; /// type P = impl Parser<Output = Result<Self>>;
/// ///
/// fn parse() -> Self::P { /// fn parse() -> Self::P {
/// #[coroutine]
/// |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> { /// |(mut namespace, mut event): (ResolveResult<'static>, &'static Event<'static>)| -> Result<Self> {
/// (namespace, event) = yield; /// (namespace, event) = yield;
/// Ok(MyStruct) /// Ok(MyStruct)

View File

@ -1 +1 @@
nightly-2024-04-19 nightly-2024-06-18