-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
overflow evaluating the requirement <Self as FilterDsl<_>>::Output
with 1.49.0
#80953
Comments
A stable-to-stable regression like this should have been caught by crater, but it looks like wundergraph fails to build on crater. |
@SNCPlay42 To just cite from the crate log you've linked: Wundergraph did not fail to build, crater did only fail to build the corresponding tests (which is understandable, because they are not included in the release, because that's impossible to do with cargo (as you cannot release a package that tests depends on another crate that depends on the released crate)).
Anyway I believe crate should not just dismiss build results if the tests fail to build. |
Oops, looks like crater wouldn't have caught this then because the beta compiler also successfully built (the previous log I posted is the 1.48 compiler acting as a baseline) the crate without tests. (Was this regression introduced in a backport after the crater run, then?) But it looks like crater really doesn't differentiate errors building the main crate from errors building the tests (it only differentiates errors running the tests). Filed rust-lang/crater#558 |
So likely related to #80417, as blind guess I would say it's #80246, so cc @matthewjasper |
Reduction: ( struct AlternateTable {}
struct AlternateQuery {}
pub trait Query {}
pub trait AsQuery {
type Query;
}
impl<T: Query> AsQuery for T {
type Query = Self;
}
impl AsQuery for AlternateTable {
type Query = AlternateQuery;
}
pub trait Table: AsQuery {
type PrimaryKey;
}
impl Table for AlternateTable {
type PrimaryKey = ();
}
pub trait FilterDsl<Predicate> {
type Output;
}
pub type Filter<Source, Predicate> = <Source as FilterDsl<Predicate>>::Output;
impl<T, Predicate> FilterDsl<Predicate> for T
where
T: Table,
T::Query: FilterDsl<Predicate>,
{
type Output = Filter<T::Query, Predicate>;
}
impl<Predicate> FilterDsl<Predicate> for AlternateQuery {
type Output = &'static str;
}
pub trait HandleDelete {
type Filter;
}
impl<T> HandleDelete for T
where
T: Table,
T::Query: FilterDsl<T::PrimaryKey>,
Filter<T::Query, T::PrimaryKey>: ,
{
type Filter = Filter<T::Query, T::PrimaryKey>;
}
fn main() {
let x: <AlternateTable as HandleDelete>::Filter = "Hello, world";
println!("{}", x);
} The code compiles successfully if:
|
searched nightlies: from nightly-2020-10-01 to nightly-2021-01-13 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --preserve --start=2020-10-01 -- check confirmed to be #80246. |
So maybe also related to #80807, with the difference that this worked on some older release. |
Assigning |
…=nikomatsakis Make hitting the recursion limit in projection non-fatal This change was originally made in rust-lang#80246 to avoid future (effectively) infinite loop bugs in projections, but wundergraph relies on rustc recovering here. cc rust-lang#80953 r? `@nikomatsakis`
…ikomatsakis Make hitting the recursion limit in projection non-fatal This change was originally made in rust-lang#80246 to avoid future (effectively) infinite loop bugs in projections, but wundergraph relies on rustc recovering here. cc rust-lang#80953 r? `@nikomatsakis`
…ikomatsakis Make hitting the recursion limit in projection non-fatal This change was originally made in rust-lang#80246 to avoid future (effectively) infinite loop bugs in projections, but wundergraph relies on rustc recovering here. cc rust-lang#80953 r? `@nikomatsakis`
Okay, so this worked in 1.48.0, broke in 1.49.0, and was fixed in 1.50.0 by #81055. A stable backport was declined, and this issue should have been closed then. Closing now. |
@jackh726 Is the crater issue fixed, so that similar regressions wont be ignored in the future again? |
Yes there's a regression test |
I'm not sure. Since the issue (rust-lang/crater#558) is still open, I would assume that bug remains. But that is tracked separately from here. |
Code
I've tried to compile wundergraph with the current stable release (1.49)
I expected that the code compiles because it worked with 1.48.
Instead, this happened: The code fails to compile with the following error message:
Version it worked on
It most recently worked on: Rust 1.48
It most recently worked on:
Version with regression
rustc --version --verbose
:As a side note: This is another diesel/trait system related issue that occurred with the latest release. Could we please consider something like #79599 to prevent this in the future? I doesn't feel right for me that I need to spend a considerable amount of my free time for such regression to a language that calls it self stable in such a way that old code should continue to compile.
The text was updated successfully, but these errors were encountered: