From 08543808c94f491969ee279afef1d4a7f60c570e Mon Sep 17 00:00:00 2001 From: Jeffrey Smith II Date: Sun, 17 Sep 2023 11:52:15 -0400 Subject: [PATCH] chore: update prost to 0.12 (#111) * chore: update prost to 0.12 * chore: fix lint * chore: update descriptors --------- Co-authored-by: Raphael Taylor-Davies --- Cargo.toml | 10 ++++++---- pbjson-build/Cargo.toml | 4 ++-- pbjson-build/src/message.rs | 4 ++-- pbjson-test/Cargo.toml | 4 ++-- pbjson-types/Cargo.toml | 4 ++-- pbjson-types/descriptors.bin | Bin 114900 -> 121444 bytes pbjson-types/src/timestamp.rs | 6 +++--- rust-toolchain.toml | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b13ec79..6797e52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,9 @@ [workspace] members = [ - "pbjson", - "pbjson-build", - "pbjson-test", - "pbjson-types", + "pbjson", + "pbjson-build", + "pbjson-test", + "pbjson-types", ] + +resolver = "2" \ No newline at end of file diff --git a/pbjson-build/Cargo.toml b/pbjson-build/Cargo.toml index 5774a66..153eb80 100644 --- a/pbjson-build/Cargo.toml +++ b/pbjson-build/Cargo.toml @@ -11,8 +11,8 @@ repository = "https://github.com/influxdata/pbjson" [dependencies] heck = "0.4" -prost = "0.11" -prost-types = "0.11" +prost = "0.12" +prost-types = "0.12" itertools = "0.10" [dev-dependencies] diff --git a/pbjson-build/src/message.rs b/pbjson-build/src/message.rs index 4364fca..8153153 100644 --- a/pbjson-build/src/message.rs +++ b/pbjson-build/src/message.rs @@ -183,7 +183,7 @@ fn field_modifier( field: &FieldDescriptorProto, field_type: &FieldType, ) -> FieldModifier { - let label = Label::from_i32(field.label.expect("expected label")).expect("valid label"); + let label = Label::try_from(field.label.expect("expected label")).expect("valid label"); if field.proto3_optional.unwrap_or(false) { assert_eq!(label, Label::Optional); return FieldModifier::Optional; @@ -217,7 +217,7 @@ fn field_type(descriptors: &DescriptorSet, field: &FieldDescriptorProto) -> Fiel Some(type_name) => resolve_type(descriptors, type_name.as_str()), None => { let scalar = - match Type::from_i32(field.r#type.expect("expected type")).expect("valid type") { + match Type::try_from(field.r#type.expect("expected type")).expect("valid type") { Type::Double => ScalarType::F64, Type::Float => ScalarType::F32, Type::Int64 | Type::Sfixed64 | Type::Sint64 => ScalarType::I64, diff --git a/pbjson-test/Cargo.toml b/pbjson-test/Cargo.toml index 5b7fb55..f1c6b5f 100644 --- a/pbjson-test/Cargo.toml +++ b/pbjson-test/Cargo.toml @@ -7,7 +7,7 @@ description = "Test resources for pbjson converion" repository = "https://github.com/influxdata/pbjson" [dependencies] -prost = "0.11" +prost = "0.12" pbjson = { path = "../pbjson" } pbjson-types = { path = "../pbjson-types" } serde = { version = "1.0", features = ["derive"] } @@ -24,5 +24,5 @@ chrono = "0.4" serde_json = "1.0" [build-dependencies] -prost-build = "0.11" +prost-build = "0.12" pbjson-build = { path = "../pbjson-build" } diff --git a/pbjson-types/Cargo.toml b/pbjson-types/Cargo.toml index 570639b..ba3c917 100644 --- a/pbjson-types/Cargo.toml +++ b/pbjson-types/Cargo.toml @@ -14,12 +14,12 @@ exclude = ["protos/*"] bytes = "1.0" chrono = { version = "0.4", default-features = false, features = ["alloc"] } pbjson = { path = "../pbjson", version = "0.5" } -prost = "0.11" +prost = "0.12" serde = { version = "1.0", features = ["derive"] } [dev-dependencies] serde_json = "1.0" [build-dependencies] # In alphabetical order -prost-build = "0.11" +prost-build = "0.12" pbjson-build = { path = "../pbjson-build", version = "0.5" } diff --git a/pbjson-types/descriptors.bin b/pbjson-types/descriptors.bin index b7fe6319aab3428edd1325762abc3341b1272786..0e370ea3c1b90e1764430aa0e542d4b6544182d6 100644 GIT binary patch delta 20473 zcmbV!3wTx4wQlBI&#axt&Q1a`yf)z>&xmNPD7lIdG%5)NtX92EL)bu0L&8Ub)Slih z6|4o1)pp?t71Rg?i%_&|F!g~5f<#4#yaWY7u%Z-;76jp9z5kexy*B;MJy);a=g0oX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{?`&Lr8M}d{T3lcLz6%d%cDB2Asc0tzhT9OxPxe9p zZ??O6@@JVs03WuyMe=9ELICHtyZ8o3O$`Y!V25iD?B=A5L!dZQGyzH-{Y!ICoX0hPz0Zy5 zsi6-{`=}VCQ<$0kuKJ1|=O_;o0#Dfigcl1uRUd%RUEmeTGbSL+ zEb#C#oUVilX|4R;Vq*#$|RXOAjw=80=( z|Em0<>coAGO+R8~On5>ax9Hbo{6zFIGg9 z7Z4ou?BT_KjwGhyXX^BG_Qr>AWl>jnLAxFv8!u=z9Q4%oL2l7{IOrA06QU5ni-R6k z1Z^KA0Pghc5#6~Fzaq%yq-D{W%}EQRGvyTxHadc2*zj&r_;tv$FYO*c>jMJgD6Nn~ z*`%~a4tYhRjS4sqdE>^@Z8^7#;%=9Rf4ISlk23M&mh^(@>}U~vvgqDMA2ePU=b#0#wRLT`5w4!Z=BlGEMmdj?X-MQ1R7S{-me>f=#@M##6cC zv2lXR^)sD+F+va&$%_LafD@m2xHzC6pOXLb{6at#PZ@lz>+{MbqD*<@F@m$}J`MG)w0{+Is zjq{{#H4M7orPtoYE>mi>$S-(qZk8I|(OmHGTZHd+t3h(nOGnGuSgHu>nV@#jbHiC` zl-`RTKC95W#3)+YkB8K2U0^9NQ;1(iVnm+2QxPM;`go|Pe5(rqa`SiyZ}pDBe*alj ORkLO{HkGrL5B?tvUHmx! diff --git a/pbjson-types/src/timestamp.rs b/pbjson-types/src/timestamp.rs index 1722a9a..e7a1fc5 100644 --- a/pbjson-types/src/timestamp.rs +++ b/pbjson-types/src/timestamp.rs @@ -1,9 +1,9 @@ use crate::Timestamp; -use chrono::{DateTime, NaiveDateTime, Utc}; +use chrono::{DateTime, NaiveDateTime, TimeZone, Utc}; use serde::de::Visitor; use serde::Serialize; -impl TryFrom for chrono::DateTime { +impl TryFrom for DateTime { type Error = &'static str; fn try_from(value: Timestamp) -> Result { let Timestamp { seconds, nanos } = value; @@ -15,7 +15,7 @@ impl TryFrom for chrono::DateTime { .map_err(|_| "out of range integral type conversion attempted")?, ) .ok_or("invalid or out-of-range datetime")?; - Ok(Self::from_utc(dt, Utc)) + Ok(Utc.from_utc_datetime(&dt)) } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7b7e745..e724aeb 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.71" +channel = "1.72" components = ["rustfmt", "clippy"]