-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
endless loop by running cargo test
with toolchain 2024-05-14
#125269
Comments
This regressed in #123594, where the new solver got enabled for the It looks like the core issue here is some kind of exponential runtime in the new solver when there are many bounds on associated types. Also, this is unrelated to "minimal" repropub trait Typed {}
pub struct SpeciesCases<Elim>(Elim);
pub trait SpeciesPackedElim {
type Ogre;
type Cyclops;
type Wendigo;
type Cavetroll;
type Mountaintroll;
type Swamptroll;
type Dullahan;
type Werewolf;
type Occultsaurok;
type Mightysaurok;
type Slysaurok;
type Mindflayer;
type Minotaur;
type Tidalwarrior;
type Yeti;
type Harvester;
type Blueoni;
type Redoni;
type Cultistwarlord;
type Cultistwarlock;
type Huskbrute;
type Tursus;
type Gigasfrost;
type AdletElder;
type SeaBishop;
type HaniwaGeneral;
type TerracottaBesieger;
type TerracottaDemolisher;
type TerracottaPunisher;
type TerracottaPursuer;
type Cursekeeper;
}
impl<'b, Elim: SpeciesPackedElim> Typed for &'b SpeciesCases<Elim>
where
&'b Elim::Ogre: Typed,
&'b Elim::Cyclops: Typed,
&'b Elim::Wendigo: Typed,
&'b Elim::Cavetroll: Typed,
&'b Elim::Mountaintroll: Typed,
&'b Elim::Swamptroll: Typed,
&'b Elim::Dullahan: Typed,
&'b Elim::Werewolf: Typed,
&'b Elim::Occultsaurok: Typed,
&'b Elim::Mightysaurok: Typed,
&'b Elim::Slysaurok: Typed,
&'b Elim::Mindflayer: Typed,
&'b Elim::Minotaur: Typed,
&'b Elim::Tidalwarrior: Typed,
&'b Elim::Yeti: Typed,
&'b Elim::Harvester: Typed,
&'b Elim::Blueoni: Typed,
&'b Elim::Redoni: Typed,
&'b Elim::Cultistwarlord: Typed,
&'b Elim::Cultistwarlock: Typed,
&'b Elim::Huskbrute: Typed,
&'b Elim::Tursus: Typed,
&'b Elim::Gigasfrost: Typed,
&'b Elim::AdletElder: Typed,
&'b Elim::SeaBishop: Typed,
&'b Elim::HaniwaGeneral: Typed,
&'b Elim::TerracottaBesieger: Typed,
&'b Elim::TerracottaDemolisher: Typed,
&'b Elim::TerracottaPunisher: Typed,
&'b Elim::TerracottaPursuer: Typed,
&'b Elim::Cursekeeper: Typed,
{}
fn main() {
pub struct Cases;
impl<'b> Typed for &'b Cases {}
} |
cc @lcnr could the couple search graph PRs helping on fuchsia also help here? |
cargo test
with toolchain 2024-05-14cargo test
with toolchain 2024-05-14
looking into it, thanks @lukas-code for the minimization. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
…, r=compiler-errors `-Znext-solver`: eagerly normalize when adding goals fixes rust-lang#125269. I am not totally with this fix and going to keep this open until we have a more general discussion about how to handle hangs caused by lazy norm in the new solver.
…, r=compiler-errors `-Znext-solver`: eagerly normalize when adding goals fixes rust-lang#125269. I am not totally with this fix and going to keep this open until we have a more general discussion about how to handle hangs caused by lazy norm in the new solver.
Rollup merge of rust-lang#125343 - lcnr:eagerly-normalize-added-goals, r=compiler-errors `-Znext-solver`: eagerly normalize when adding goals fixes rust-lang#125269. I am not totally with this fix and going to keep this open until we have a more general discussion about how to handle hangs caused by lazy norm in the new solver.
I tried this code:
(sorry, i couldn't extract a minimal example and reproduce it)
I expected to see this happen: ElimCase doctest in line 86 to finish after some time
Instead, this happened: the tests takes endless (i waited 2 hours in CI)
Meta
rustc --version --verbose
:cargo test
:code in the doc-test in question:
Workaround
As workaround we added a main function to the doctest, as the test doesnt execute code so far (only defines stuff) it then runs immediately again
https://gitlab.com/veloren/veloren/-/commit/3cc4b947ebd049dcdf82ca4a66a815d32d4d43f8
The text was updated successfully, but these errors were encountered: