-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prost-build: Split Config
and Module
into a separate module and files
#1020
Conversation
0ebdbb6
to
d23f2c5
Compare
d23f2c5
to
81e17c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am amazed at how many lines the Config struct is. This move is a big improvement.
Needs a rebase to remove the clippy commits from this branch.
Can you check none of the moved code is changed meanwhile on the main branch?
81e17c4
to
bbdb402
Compare
Hi! I've now resolved the comments and combined the commit form #1015. I was first thinking about closing both in order to make sure that I wasn't overriding any new changes, but none had come in. |
I think that the failing CI clippy job was caused by #1014. It should probably be amended or fixed in a separate PR though. Might be worth denying failing CI jobs from getting merged. |
Config
and Module
into a separate module and files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I will fix CI in #1032 and then merge this
bbdb402
to
8e0f28a
Compare
…iles (tokio-rs#1020) * build: split `Config` into a separate module * build: split `Module` into a separate module
_PROST!_ is a [Protocol Buffers](https://developers.google.com/protocol-buffers/) implementation for the [Rust Language](https://www.rust-lang.org/). `prost` generates simple, idiomatic Rust code from `proto2` and `proto3` files. This patch update brings new fixes: - fix: include_file should handle proto without package (tokio-rs#1002) - Place Config::format behind the format feature flag - Handle keyword `Self` after stripping enum type prefix (tokio-rs#998) ## Documentation - fix(readme): fix the link and badge for CI (tokio-rs#1049) ## Internal - style(codegen): `Syntax` to a separate file (tokio-rs#1029) - chore(codegen): extract c string escaping to a separate file (tokio-rs#1028) - style(prost-build): `CodeGenerator::boxed` method (tokio-rs#1019) - style(prost-build): Consolidate field data into struct (tokio-rs#1017) - style(prost-build): `BytesType and MapType` into a `collections` module. (tokio-rs#1030) - style(prost-build): Split `Config` and `Module` into a separate module and files (tokio-rs#1020) - style(prost-build): prost_path helper (tokio-rs#1018) - style: Fix toml indent (tokio-rs#1048) - style: Fix clippy warnings and enable clippy in CI (tokio-rs#1008) - build: Use git submodule to download protobuf sources (tokio-rs#1014) - ci: Add TOML validation with `taplo` (tokio-rs#1034) - tests: Create a separate tempdir for each test (tokio-rs#1044) - tests: Remove GoogleMessage3 and GoogleMessage4 benchmarks (tokio-rs#1037) - chore: Update internal crates to Rust edition 2021 (tokio-rs#1039) - chore: Update crate descriptions (tokio-rs#1038) - chore: Fix clippy checks in CI (tokio-rs#1032) - chore: Add Casper Meijn as author (tokio-rs#1025)
_PROST!_ is a [Protocol Buffers](https://developers.google.com/protocol-buffers/) implementation for the [Rust Language](https://www.rust-lang.org/). `prost` generates simple, idiomatic Rust code from `proto2` and `proto3` files. This patch update brings new fixes: - fix: include_file should handle proto without package (#1002) - Place Config::format behind the format feature flag - Handle keyword `Self` after stripping enum type prefix (#998) ## Documentation - fix(readme): fix the link and badge for CI (#1049) ## Internal - style(codegen): `Syntax` to a separate file (#1029) - chore(codegen): extract c string escaping to a separate file (#1028) - style(prost-build): `CodeGenerator::boxed` method (#1019) - style(prost-build): Consolidate field data into struct (#1017) - style(prost-build): `BytesType and MapType` into a `collections` module. (#1030) - style(prost-build): Split `Config` and `Module` into a separate module and files (#1020) - style(prost-build): prost_path helper (#1018) - style: Fix toml indent (#1048) - style: Fix clippy warnings and enable clippy in CI (#1008) - build: Use git submodule to download protobuf sources (#1014) - ci: Add TOML validation with `taplo` (#1034) - tests: Create a separate tempdir for each test (#1044) - tests: Remove GoogleMessage3 and GoogleMessage4 benchmarks (#1037) - chore: Update internal crates to Rust edition 2021 (#1039) - chore: Update crate descriptions (#1038) - chore: Fix clippy checks in CI (#1032) - chore: Add Casper Meijn as author (#1025)
…env` fixes: tokio-rs#1062 I'm adding these because of a breaking change introduced in tokio-rs#1020 Since `0.12.5` this is causing build failures after `cargo update`. ``` Compiling grpc-build v6.1.0 error[E0432]: unresolved imports `prost_build::protoc_from_env`, `prost_build::protoc_include_from_env` --> /Users/ethan.brierley/.cargo/registry/src/index.crates.io-6f17d22bba15001f/grpc-build-6.1.0/src/lib.rs:3:19 | 3 | use prost_build::{protoc_from_env, protoc_include_from_env, Module}; | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ no `protoc_include_from_env` in the root | | | no `protoc_from_env` in the root ```
…env` fixes: tokio-rs#1062 I'm adding to fix a breaking change introduced in tokio-rs#1020 which moved these items. Since `0.12.5` this is causing build failures after `cargo update`. ``` Compiling grpc-build v6.1.0 error[E0432]: unresolved imports `prost_build::protoc_from_env`, `prost_build::protoc_include_from_env` --> /Users/ethan.brierley/.cargo/registry/src/index.crates.io-6f17d22bba15001f/grpc-build-6.1.0/src/lib.rs:3:19 | 3 | use prost_build::{protoc_from_env, protoc_include_from_env, Module}; | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ no `protoc_include_from_env` in the root | | | no `protoc_from_env` in the root ```
…_from_env` & `protoc_include_from_env` fixes: tokio-rs#1062 I'm adding to fix a breaking change introduced in tokio-rs#1020 which moved these items. Since `0.12.5` this is causing build failures after `cargo update`. ``` Compiling grpc-build v6.1.0 error[E0432]: unresolved imports `prost_build::protoc_from_env`, `prost_build::protoc_include_from_env` --> /Users/ethan.brierley/.cargo/registry/src/index.crates.io-6f17d22bba15001f/grpc-build-6.1.0/src/lib.rs:3:19 | 3 | use prost_build::{protoc_from_env, protoc_include_from_env, Module}; | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ no `protoc_include_from_env` in the root | | | no `protoc_from_env` in the root ```
…_from_env` & `protoc_include_from_env` (#1063) fixes: #1062 I'm adding to fix a breaking change introduced in #1020 which moved these items. Since `0.12.5` this is causing build failures after `cargo update`. ``` Compiling grpc-build v6.1.0 error[E0432]: unresolved imports `prost_build::protoc_from_env`, `prost_build::protoc_include_from_env` --> /Users/ethan.brierley/.cargo/registry/src/index.crates.io-6f17d22bba15001f/grpc-build-6.1.0/src/lib.rs:3:19 | 3 | use prost_build::{protoc_from_env, protoc_include_from_env, Module}; | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ no `protoc_include_from_env` in the root | | | no `protoc_from_env` in the root ```
PR contains a visibility question similar to #1015, which this PR builds upon,