Skip to content
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

fix(prost-build): re-export error_message_protoc_not_found, protoc_from_env & protoc_include_from_env #1063

Merged
merged 1 commit into from
May 17, 2024

Conversation

eopb
Copy link
Contributor

@eopb eopb commented May 16, 2024

fixes: #1062

I'm adding this to fix a breaking change introduced in #1020 where these items were moved.

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

@eopb
Copy link
Contributor Author

eopb commented May 16, 2024

@gibbz00
Looking at #1015 I'm guessing that making these private was intentional. I'm guessing this was expected to be included only in a breaking release. If you'd like these to be private you could open a follow-up PR deprecating the re-exports so that the change remains non-breaking. The re-exports can then be removed in 0.13.0.

@LucioFranco
Copy link
Member

Yup, let me yank v0.12.5, we didn't think this was going to cause an issue but clearly it does 😄 thanks for the report.

@LucioFranco
Copy link
Member

It's been yanked, we will work on a follow up release that fixes these semver issues.

Copy link
Collaborator

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I accepted the change that broke your build. I was naive of me to assume this is an “internal” function and nobody is using it.

@@ -149,7 +149,7 @@ mod message_graph;
mod path;

mod config;
pub use config::Config;
pub use config::{protoc_from_env, protoc_include_from_env, Config};
Copy link
Collaborator

@caspermeijn caspermeijn May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should restore all moved pub functions. This version will satisfy cargo-semver-checks:

Suggested change
pub use config::{protoc_from_env, protoc_include_from_env, Config};
pub use config::{error_message_protoc_not_found, protoc_from_env, protoc_include_from_env, Config};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I accepted the change that broke your build. I was naive of me to assume this is an “internal” function and nobody is using it.

No worries. It was great to see it quickly yanked and sorted 🙌. Thanks for spending your time working on the crates I use :)

We should restore all moved pub functions. This version will satisfy cargo-semver-checks:

👍 https://github.com/tokio-rs/prost/compare/1e5e904b47773b92ea46ba6e82feaaa2f006a9f4..f4be7b750a6039c8535ae3e105cf912c3b0c12e7

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. It was great to see it quickly yanked and sorted 🙌. Thanks for spending your time working on the crates I use :)

Well, you created this PR half an hour after publish. So, I am impressed with that as well 😃

…_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
```
@eopb eopb changed the title fix(prost-build): re-export protoc_from_env & protoc_include_from_env fix(prost-build): re-export error_message_protoc_not_found, protoc_from_env & protoc_include_from_env May 17, 2024
@caspermeijn caspermeijn added this pull request to the merge queue May 17, 2024
Merged via the queue into tokio-rs:master with commit 4b11315 May 17, 2024
15 checks passed
caspermeijn added a commit to caspermeijn/prost that referenced this pull request May 17, 2024
_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 fixes a regression:

- fix(prost-build): re-export `error_message_protoc_not_found`, `protoc_from_env` & `protoc_include_from_env` (tokio-rs#1063)
github-merge-queue bot pushed a commit that referenced this pull request May 17, 2024
_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 fixes a regression:

- fix(prost-build): re-export `error_message_protoc_not_found`, `protoc_from_env` & `protoc_include_from_env` (#1063)
@eopb eopb deleted the push-kxqxzvvuyuwr branch May 17, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

protoc_from_env and protoc_include_from_env are not exposed in 0.12.5
3 participants