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

Unexpected trait resolution overflow error #74868

Closed
weiznich opened this issue Jul 28, 2020 · 10 comments · Fixed by #75494
Closed

Unexpected trait resolution overflow error #74868

weiznich opened this issue Jul 28, 2020 · 10 comments · Fixed by #75494
Assignees
Labels
A-trait-system Area: Trait system C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections P-critical Critical priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@weiznich
Copy link
Contributor

Trying to compile wundergraph_example with recent nightly's or the current beta ( rustc 1.46.0-beta.2 (6f959902b 2020-07-23) compiler fails with the attached error message. The compilation suceeds without warning using the latest stable (rustc 1.45.0 (5c1f21c3b 2020-07-13)) release.

Error message

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation<Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_wrapper<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_inner<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation<Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation<Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation<Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_wrapper<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_wrapper<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_wrapper<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_inner<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_inner<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0275]: overflow evaluating the requirement `<<Hero_table as diesel::query_builder::AsQuery>::Query as diesel::query_dsl::boxed_dsl::BoxedDsl<'_, DB>>::Output`
  --> wundergraph_example/src/mutations.rs:73:1
   |
73 | / wundergraph::mutation_object! {
74 | |     /// Global mutation object for the schema
75 | |     Mutation {
76 | |         Hero(insert = NewHero, update = HeroChangeset,),
...  |
81 | |     }
82 | | }
   | |_^
   |
   = note: required because of the requirements on the impl of `wundergraph::query_builder::mutations::HandleUpdate<hero::Hero, mutations::HeroChangeset, DB, Ctx>` for `Hero_table`
   = note: required because of the requirements on the impl of `juniper::GraphQLType<wundergraph::scalar::WundergraphScalarValue>` for `mutations::Mutation_inner<'a, Ctx>`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 12 previous errors

For more information about this error, try `rustc --explain E0275`.
error: could not compile `wundergraph_example`.

cargo bisect-rustc found that the regression happened in nightly-2020-06-21

@weiznich weiznich added the C-bug Category: This is a bug. label Jul 28, 2020
@jonas-schievink jonas-schievink added A-trait-system Area: Trait system regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Jul 28, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 28, 2020
@JohnTitor JohnTitor added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Jul 28, 2020
@LeSeulArtichaut
Copy link
Contributor

Let’s try to find an MCVE. @rustbot ping cleanup

@rustbot rustbot added the ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections label Jul 28, 2020
@rustbot
Copy link
Collaborator

rustbot commented Jul 28, 2020

Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3

cc @AminArria @camelid @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke

@weiznich
Copy link
Contributor Author

Corresponding commit range
From looking over those commits I think one of the following PR's could have caused that issue (based on the commit description):

I'm not sure if I'm able to provide a MCVE in a timely manner as some complex generic code distributed over multiple crates is involved here.

@LeSeulArtichaut LeSeulArtichaut added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Jul 28, 2020
@spastorino spastorino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 29, 2020
@spastorino
Copy link
Member

spastorino commented Jul 29, 2020

Assigning P-critical as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@spastorino spastorino added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jul 29, 2020
@rust-lang rust-lang deleted a comment from weiznich Jul 29, 2020
@spastorino
Copy link
Member

@weiznich thanks for noting that, fixed the comment above and removed your link to avoid confusion.

@pnkfelix
Copy link
Member

self-assigning to assist with, at least, getting an MCVE. (See also my blog post on creating MCVEs: http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ )

@pnkfelix pnkfelix self-assigned this Jul 30, 2020
@weiznich
Copy link
Contributor Author

Due to time constraints I'm not able to work on a MCVE by myself. If someone needs information about diesel/wundergraph I'm happy to help.

@matthewjasper
Copy link
Contributor

This is probably due to #73452 allowing cycles to be detected earlier. #73905 fixes this, but isn't suitable for a backport, so I'll open a PR that only includeds the relevant commit.

@spastorino
Copy link
Member

Should we assign this issue to @matthewjasper given that they will work on a backport?.

@p-alik
Copy link

p-alik commented Aug 21, 2020

Trying to compile wundergraph_example with recent nightly's or the current beta ( rustc 1.46.0-beta.2 (6f959902b 2020-07-23) compiler fails with the attached error message.

The compilation succeeds with rustc 1.47.0-nightly (e15510ca3 2020-08-20) faultlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections P-critical Critical priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants