Stream: wg-traits

Topic: universe transition


nikomatsakis (Oct 05 2018 at 16:23, on Zulip):

So some of you may have seen that my PR #54649 landed — I'm now working on a follow-up that converts all of rustc to use universe-based constraints for higher-ranked stuff instead of the existing leak-check. This PR was basically working before I rebased, but now it doesn't, so I have to figure out what I did wrong. Hopefully will open it soon.

Even once it is working, we still have to do some crater runs and also improve the diagnostics, which are currently horrific.

nikomatsakis (Oct 05 2018 at 18:31, on Zulip):

@scalexm for now, I opened a " second round of refactorings for universes #54858 " PR...

scalexm (Oct 05 2018 at 18:34, on Zulip):

@nikomatsakis ok cool, will look soon

nikomatsakis (Oct 05 2018 at 18:57, on Zulip):

debating whether to add a few more things in there...

nikomatsakis (Oct 08 2018 at 19:52, on Zulip):

btw I've rebased my universes branch atop https://github.com/rust-lang/rust/pull/54858

nikomatsakis (Oct 08 2018 at 19:53, on Zulip):

(which is now green)

nikomatsakis (Oct 08 2018 at 19:53, on Zulip):

my universes branch is still failing some tests, I haven't had time to debug yet

nikomatsakis (Oct 08 2018 at 19:53, on Zulip):

I'd like to land https://github.com/rust-lang/rust/pull/54858 first probably — then maybe I can pull a 3rd round of refactoring. ideally I can get the actual universe branch down to a relatively small PR before it lands, particularly since it'll need crater runs and things.

scalexm (Oct 08 2018 at 19:56, on Zulip):

@nikomatsakis ok I've already read through it twice and it seems good to me

scalexm (Oct 08 2018 at 19:57, on Zulip):

I'm ok with keeping "next universe" terminology

nikomatsakis (Oct 08 2018 at 19:58, on Zulip):

:+1: I think it's fine for now too

nikomatsakis (Oct 08 2018 at 19:58, on Zulip):

I think the new terms are clearer though than "sub" or "super"

nikomatsakis (Oct 08 2018 at 19:58, on Zulip):

in particular when I think things through in my head I tend to think in terms of "can name"

nikomatsakis (Oct 08 2018 at 19:58, on Zulip):

(e.g., can this variable name that type...)

scalexm (Oct 08 2018 at 19:58, on Zulip):

yes

scalexm (Oct 08 2018 at 19:59, on Zulip):

so, can we merge it?

nikomatsakis (Oct 08 2018 at 19:59, on Zulip):

I think so

nikomatsakis (Oct 08 2018 at 20:00, on Zulip):

then I can get to the next refactorings PR :)

nikomatsakis (Oct 08 2018 at 21:15, on Zulip):

ok, I found the bug in my rebase. It wasn't in my PR, it was an interaction with https://github.com/rust-lang/rust/pull/54624, which was leaning on the leak_check in ways that I did not fully understand

nikomatsakis (Oct 08 2018 at 21:21, on Zulip):

ok, well, sort of, I still get some failing tests...

nikomatsakis (Oct 08 2018 at 21:21, on Zulip):

(but related to that same issue)

nikomatsakis (Oct 15 2018 at 13:20, on Zulip):

Status update:

nikomatsakis (Oct 15 2018 at 21:03, on Zulip):

woohoo, https://github.com/rust-lang/rust/pull/54858 landed

nikomatsakis (Oct 16 2018 at 12:55, on Zulip):

OK, I rebased atop master, and I got around to fixing the leak-check interactions, and the universes branch now builds and passes tests! (Modulo that a lot of the diagnostics are terrible now and of course that coherence currently changes behavior)

nikomatsakis (Oct 16 2018 at 12:55, on Zulip):

I'll try to cleanup the PR a bit and think about how to take next steps towards landing

nikomatsakis (Oct 16 2018 at 12:55, on Zulip):

though one thing I'd probably like to start with is to do a crater run

nikomatsakis (Oct 24 2018 at 10:01, on Zulip):

@scalexm opened https://github.com/rust-lang/rust/pull/55305 — a 3rd refactoring PR

Jake Goulding (Oct 25 2018 at 14:11, on Zulip):

The motto of this work:

If you wish to make an apple pie from scratch, you must first invent the universe.

nikomatsakis (Oct 25 2018 at 17:32, on Zulip):

Argh. I am looking at my final branch and I noticed it's missing what I believe to be some crucial logic, such that something like exists<'a> for<'b> { 'a = 'b } would be (incorrectly) accepted — but I can't come up with a Rust test case that exposes it yet. :)

nikomatsakis (Oct 25 2018 at 17:32, on Zulip):

these are the times I wish for more "unit-testability"

nikomatsakis (Oct 25 2018 at 17:33, on Zulip):

although it's really better to wind up with end-to-end tests I think

nikomatsakis (Oct 25 2018 at 21:05, on Zulip):

ok, managed a test

nikomatsakis (Oct 30 2018 at 21:19, on Zulip):

Posted https://github.com/rust-lang/rust/pull/55517

scalexm (Oct 31 2018 at 19:45, on Zulip):

@nikomatsakis omg it seems like your universes refactor 3 is never going to land

nikomatsakis (Oct 31 2018 at 20:21, on Zulip):

lol yes

nikomatsakis (Oct 31 2018 at 20:21, on Zulip):

it's always hovering 3-5 things down :)

scalexm (Nov 01 2018 at 14:56, on Zulip):

@nikomatsakis time to do a crater run on your universes PR?

scalexm (Nov 01 2018 at 15:10, on Zulip):

btw I've read through it, it seems to me that the critical new code is just a few lines in src/librustc/infer/lexical_region_resolve/mod.rs right?

scalexm (Nov 01 2018 at 15:10, on Zulip):

but maybe I'm overlooking something

nikomatsakis (Nov 01 2018 at 16:12, on Zulip):

yep, it's not a lot of code

nikomatsakis (Nov 01 2018 at 16:12, on Zulip):

it probably is ready for a crater run, yes

nikomatsakis (Nov 01 2018 at 16:12, on Zulip):

I'll do a try build

nikomatsakis (Nov 01 2018 at 18:54, on Zulip):

ok, starting a crater run

(<3 @Pietro Albini <3)

nikomatsakis (Nov 06 2018 at 14:50, on Zulip):

@scalexm did you see that the crater run seemed to come out clean? Exciting

scalexm (Nov 06 2018 at 14:51, on Zulip):

@nikomatsakis yes I did! Time to fix the diagnostics now lol

nikomatsakis (Nov 06 2018 at 14:58, on Zulip):

yeah, I was debating about whether to try and improve them -- I might be able to reproduce the existing ones instead

nikomatsakis (Nov 06 2018 at 14:58, on Zulip):

I'd rathre "do better" but it'd be ok to leave that

nikomatsakis (Nov 19 2018 at 17:19, on Zulip):

@scalexm so I've improved the errors on https://github.com/rust-lang/rust/pull/55517 -- at least to some extent

nikomatsakis (Nov 19 2018 at 17:19, on Zulip):

any objections to r=scalexm? :) (I think you read it over, correct?)

nikomatsakis (Nov 26 2018 at 22:12, on Zulip):

ugh

nikomatsakis (Nov 26 2018 at 22:12, on Zulip):

apparently probe.rs (and maybe other code) is introduced 'erased lifetimes

nikomatsakis (Nov 26 2018 at 22:12, on Zulip):

/me investigates

nikomatsakis (Jan 02 2019 at 22:17, on Zulip):

finally getting around to rebasing this. what a pain.

Last update: Nov 12 2019 at 15:30UTC