From 3321d416bfcfbb6193835d8948eee678a0bf670f Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Mon, 13 Nov 2023 10:14:03 +0200 Subject: [PATCH] Restore `prost-reflect` dependency in build crate --- node/Cargo.lock | 1 + node/libs/protobuf_build/Cargo.toml | 1 + node/libs/protobuf_build/src/canonical.rs | 3 ++- node/libs/protobuf_build/src/lib.rs | 7 +++---- node/libs/protobuf_build/src/syntax.rs | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/node/Cargo.lock b/node/Cargo.lock index c7217382..d0737747 100644 --- a/node/Cargo.lock +++ b/node/Cargo.lock @@ -2871,6 +2871,7 @@ dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-reflect", "protox", "quote", "syn 2.0.39", diff --git a/node/libs/protobuf_build/Cargo.toml b/node/libs/protobuf_build/Cargo.toml index e2211809..88fe2580 100644 --- a/node/libs/protobuf_build/Cargo.toml +++ b/node/libs/protobuf_build/Cargo.toml @@ -12,6 +12,7 @@ heck.workspace = true prettyplease.workspace = true proc-macro2.workspace = true prost-build.workspace = true +prost-reflect.workspace = true protox.workspace = true quote.workspace = true syn.workspace = true diff --git a/node/libs/protobuf_build/src/canonical.rs b/node/libs/protobuf_build/src/canonical.rs index 3e56709a..426552cf 100644 --- a/node/libs/protobuf_build/src/canonical.rs +++ b/node/libs/protobuf_build/src/canonical.rs @@ -1,7 +1,8 @@ //! Checks whether messages in the given file descriptor set support canonical encoding. + use crate::syntax::extract_message_names; use anyhow::Context as _; -use protox::prost_reflect::{self, prost_types}; +use prost_reflect::{self, prost_types}; use std::collections::HashSet; #[derive(Default)] diff --git a/node/libs/protobuf_build/src/lib.rs b/node/libs/protobuf_build/src/lib.rs index c81ffbe5..82ebc065 100644 --- a/node/libs/protobuf_build/src/lib.rs +++ b/node/libs/protobuf_build/src/lib.rs @@ -24,12 +24,11 @@ //! these are being built simultaneously from the same build script). #![allow(clippy::print_stdout)] + pub use self::syntax::*; use anyhow::Context as _; -use protox::{ - file::File, - prost_reflect::{self, prost::Message as _, prost_types}, -}; +use prost_reflect::{prost::Message as _, prost_types}; +use protox::file::File; use std::{ collections::{HashMap, HashSet}, env, fs, diff --git a/node/libs/protobuf_build/src/syntax.rs b/node/libs/protobuf_build/src/syntax.rs index bf179d25..26b1e844 100644 --- a/node/libs/protobuf_build/src/syntax.rs +++ b/node/libs/protobuf_build/src/syntax.rs @@ -2,7 +2,7 @@ use super::ident; use anyhow::Context as _; -use protox::prost_reflect::prost_types; +use prost_reflect::prost_types; use std::{ collections::BTreeMap, fmt,