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

Tonic master branch builds on 1.52 but not 1.51 #85659

Closed
davidpdrsn opened this issue May 25, 2021 · 4 comments
Closed

Tonic master branch builds on 1.52 but not 1.51 #85659

davidpdrsn opened this issue May 25, 2021 · 4 comments
Labels
C-bug Category: This is a bug.

Comments

@davidpdrsn
Copy link

I recently worked on some changes to tonic. The changes work fine on Rust 1.52 (the version I was on when I wrote the changes) but I've since discovered that things don't compile on Rust 1.51. I see an error like this:

error[E0391]: cycle detected when computing the bounds for type parameter `T`
   --> /Users/david.pedersen/dev/major/tonic/target/debug/build/tonic-reflection-8e8e4b3f5942cb14/out/grpc.reflection.v1alpha.rs:185:43
    |
185 |                 Response = http::Response<T::ResponseBody>,
    |                                           ^^^^^^^^^^^^^^^
    |
    = note: ...which again requires computing the bounds for type parameter `T`, completing the cycle
note: cycle used when computing explicit predicates of `proto::server_reflection_client::<impl at /Users/david.pedersen/dev/major/tonic/target/debug/build/tonic-reflection-8e8e4b3f5942cb14/out/grpc.reflection.v1alpha.rs:166:5: 215:6>::with_interceptor`
   --> /Users/david.pedersen/dev/major/tonic/target/debug/build/tonic-reflection-8e8e4b3f5942cb14/out/grpc.reflection.v1alpha.rs:185:43
    |
185 |                 Response = http::Response<T::ResponseBody>,

I'm not knowingly doing anything that requires Rust 1.52 so find this error a bit surprising. Could it be a bug in rustc?

Reproduction:

$ git clone https://github.com/hyperium/tonic.git
$ cd tonic
$ cargo +1.51 check -p examples

I expected to see this happen: Things should build on 1.51 as well as 1.52.

Instead, this happened: Doesn't build on 1.51, does build on 1.52.

@hellow554
Copy link
Contributor

FWIW: here's a bisect:

searched nightlies: from nightly-2020-10-01 to nightly-2021-05-01
regressed nightly: nightly-2021-02-10
searched commits: from 0fc6756 to 097bc6a
regressed commit: f4008fe

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --end=2021-05-01 --access=github --regress=non-error

Probably #80732 allows this code to compile

@jyn514
Copy link
Member

jyn514 commented May 25, 2021

@davidpdrsn releases are immutable, and I've never heard of doing a point release for anything other than the latest stable. So I'm not sure what the point of this issue is even if it is a bugfix.

@Mark-Simulacrum
Copy link
Member

We don't support non-current stable versions, so as this works on 1.52 (and presumably beta/nightly) I'll go ahead and close.

@davidpdrsn
Copy link
Author

In case anyone is interested this was the fix hyperium/tonic#669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants