Stream: t-compiler/wg-nll

Topic: weekly meeting August 7


nikomatsakis (Aug 07 2018 at 19:33, on Zulip):

:wave: :strawberry: :sun_face:

davidtwco (Aug 07 2018 at 19:33, on Zulip):

:wave:

nikomatsakis (Aug 07 2018 at 19:34, on Zulip):

dropbox paper status document is here

nikomatsakis (Aug 07 2018 at 19:35, on Zulip):

(@everyone meeting time)

nikomatsakis (Aug 07 2018 at 19:37, on Zulip):

is is just @davidtwco and I? :)

davidtwco (Aug 07 2018 at 19:37, on Zulip):

It's looking that way.

nikomatsakis (Aug 07 2018 at 19:38, on Zulip):

ok...

nikomatsakis (Aug 07 2018 at 19:38, on Zulip):

well, as I was writing in the paper:

nikomatsakis (Aug 07 2018 at 19:38, on Zulip):

it seems like we basically "finished" our Edition Preview 2 work

nikomatsakis (Aug 07 2018 at 19:38, on Zulip):

which is awesome!

nikomatsakis (Aug 07 2018 at 19:38, on Zulip):

I can't remember the last time that I managed to complete all the issues for a milestone without knocking a bunch to the next milestone in the last minute ;)

nikomatsakis (Aug 07 2018 at 19:39, on Zulip):

I've been looking at the Release Candidate milestone and thinking about the focus there

nikomatsakis (Aug 07 2018 at 19:39, on Zulip):

my sense is that priority #1 should be correctness — in particular finishing off all regressions from last crater run that we plan to finish off

nikomatsakis (Aug 07 2018 at 19:39, on Zulip):

in my ideal world, we'd have the compiler start bootstrapping with NLL as well

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

(which may mean that we want to do some performance investigation)

davidtwco (Aug 07 2018 at 19:40, on Zulip):

release candidate issues.

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

I went through all of the crater run results that @lqd had posted

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

I found some problems

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

I filed issues for them :)

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

there aren't many, is the good news

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

a lot of stuff was fixed

nikomatsakis (Aug 07 2018 at 19:40, on Zulip):

when I retested it

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

there is one case that I do not yet know how to fix though :/

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

but it seems to be relatively minor

lqd (Aug 07 2018 at 19:42, on Zulip):

oh through both « reports » ?

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

(#53121)

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

hmm @lqd maybe I didn't go through everything :)

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

did you see the repo I made?

nikomatsakis (Aug 07 2018 at 19:42, on Zulip):

it is here https://github.com/nikomatsakis/nll-crater-run-results

nikomatsakis (Aug 07 2018 at 19:43, on Zulip):

maybe I only went through the second one or something though and should double check the results from the first...

nikomatsakis (Aug 07 2018 at 19:43, on Zulip):

I started with some hackmd link you posted to me

nikomatsakis (Aug 07 2018 at 19:43, on Zulip):

https://github.com/nikomatsakis/nll-crater-run-results/blob/master/lqd-notes.md was the text of it

nikomatsakis (Aug 07 2018 at 19:43, on Zulip):

I should have noted the link too :)

lqd (Aug 07 2018 at 19:43, on Zulip):

I did see it (on my phone rn) I think we might need to go through the 1st one (crates’ dependencies)

lqd (Aug 07 2018 at 19:44, on Zulip):

(Just to be sure)

nikomatsakis (Aug 07 2018 at 19:44, on Zulip):

seems like it would be worth re-running the results in any case

nikomatsakis (Aug 07 2018 at 19:44, on Zulip):

since this was only root regressions etc

nikomatsakis (Aug 07 2018 at 19:44, on Zulip):

and apparently it only takes 24 hours?

nikomatsakis (Aug 07 2018 at 19:44, on Zulip):

since I think we just need — at least for now — a cargo check run

nikomatsakis (Aug 07 2018 at 19:45, on Zulip):

I was debating if we should wait until we fixed the known regressions

nikomatsakis (Aug 07 2018 at 19:45, on Zulip):

I did see it (on my phone rn) I think we might need to go through the 1st one (crates’ dependencies)

what does "crates' dependencies" mean?

lqd (Aug 07 2018 at 19:45, on Zulip):

oh for sure, I was thinking the same while you were on PTO; quick turnover now for the results :)

lqd (Aug 07 2018 at 19:46, on Zulip):

errors which were not actionable cause they were in deps so I mInImIzed those instead of the crates

nikomatsakis (Aug 07 2018 at 19:47, on Zulip):

ok

nikomatsakis (Aug 07 2018 at 19:47, on Zulip):

ok so I will file an issue for another crater run

nikomatsakis (Aug 07 2018 at 19:47, on Zulip):

maybe we should Just Do It

lqd (Aug 07 2018 at 19:47, on Zulip):

(ie these crates didn’t build)

lqd (Aug 07 2018 at 19:48, on Zulip):

I have some code stashed to filter through some of those (based on simulacrum’s code) if need be

nikomatsakis (Aug 07 2018 at 19:49, on Zulip):

filed https://github.com/rust-lang/rust/issues/53171

nikomatsakis (Aug 07 2018 at 19:50, on Zulip):

I guess the way to handle getting compiler to use NLL is just to go start adding it to crates and see what happens?

nikomatsakis (Aug 07 2018 at 19:50, on Zulip):

@lqd you did some of that before, right?

lqd (Aug 07 2018 at 19:52, on Zulip):

depending on the case and whether the deps built I was either usIng the cargo check -Z or rustflags (this phone capitalizes like the spongebob meme)

nikomatsakis (Aug 07 2018 at 19:52, on Zulip):

I will file an issue with a checklist of crates

nikomatsakis (Aug 07 2018 at 19:53, on Zulip):

filed https://github.com/rust-lang/rust/issues/53172

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

anyway I've also got some perf ideas

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

what I wanted to do but didn't yet do, but prob will now

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

is to do some more measurements

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

and try to see what they suggest

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

now that I am back home in Boston and have my linux machine up and going again

nikomatsakis (Aug 07 2018 at 19:54, on Zulip):

( the problem, in case you are curious: the tp-link ethernet adapter had mysteriously failed >:( and needed to be reset )

davidtwco (Aug 07 2018 at 19:55, on Zulip):

(deleted)

nikomatsakis (Aug 07 2018 at 19:55, on Zulip):

I guess a question is, what do people think about "diagnostic improvements"?

nikomatsakis (Aug 07 2018 at 19:55, on Zulip):

like, how much to focus on them, is the list that is currently there good?

davidtwco (Aug 07 2018 at 19:55, on Zulip):

I think we're doing pretty well, I'm slowly working through the list that @pnkfelix put together.

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

there is also one major "elephant in the room", which is user type annotations

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

yeah, I agree

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

my sense is that it is worth it to just keep pushing on those

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

it will make a huge difference, I think, to how people perceive the result

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

but not at the cost of all these other things of course :)

davidtwco (Aug 07 2018 at 19:56, on Zulip):

Yeah, it's the "user interface" of NLL to some degree.

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

one thing I wanted to do that I haven't had time for

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

is just to do an overall review of the language we use

nikomatsakis (Aug 07 2018 at 19:56, on Zulip):

and check for consistency etc

nikomatsakis (Aug 07 2018 at 19:57, on Zulip):

but that is kind of independent from NLL

nikomatsakis (Aug 07 2018 at 19:57, on Zulip):

it's just something I've been wanting to do for some time — I feel that the borrowck uses a lot of jargon sometimes

nikomatsakis (Aug 07 2018 at 19:57, on Zulip):

anyway, it's fine, I think we should keep those issues open, esp. the @pnkfelix check list (which is awesome) but we shouldn't have everybody just doing diagnostics :)

davidtwco (Aug 07 2018 at 19:57, on Zulip):

Unless I'm missing something, it doesn't seem like there are that many soundness/correctness issues remaining. It's mostly continual improvements in diagnostics and perf.

nikomatsakis (Aug 07 2018 at 19:58, on Zulip):

I think that's right

nikomatsakis (Aug 07 2018 at 19:58, on Zulip):

with exception of the user type annotations thing

nikomatsakis (Aug 07 2018 at 19:58, on Zulip):

I may try to focus on that

nikomatsakis (Aug 07 2018 at 19:58, on Zulip):

or at least part of it

davidtwco (Aug 07 2018 at 19:58, on Zulip):

Yeah. I can spend some time on that as well if there are parts of it that can be delegated.

nikomatsakis (Aug 07 2018 at 19:58, on Zulip):

I'll try to see whatI can do about breaking it up

nikomatsakis (Aug 07 2018 at 19:59, on Zulip):

I want to look a bit at the "first half", which I've not thought about much at all — how to identify where user-given annotations are

nikomatsakis (Aug 07 2018 at 19:59, on Zulip):

e.g. for stuff like foo.bar::<T>(...)

nikomatsakis (Aug 07 2018 at 19:59, on Zulip):

right now we don't have an easy way to intercept those

nikomatsakis (Aug 07 2018 at 19:59, on Zulip):

ok doke, I guess that's it

davidtwco (Aug 07 2018 at 19:59, on Zulip):

The other half was stuff like destructuring the more complex types IIRC?

nikomatsakis (Aug 07 2018 at 19:59, on Zulip):

yeah, that might be something delegatable

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

e.g., stuff like let (x, y);

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

which builds on the work you already did I expect

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

I think that's basically going to be a different mechanism from the one we use for substitutions

davidtwco (Aug 07 2018 at 20:00, on Zulip):

@pnkfelix had some work done on that which might be salvagable.

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

yes

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

I've not looked at it

nikomatsakis (Aug 07 2018 at 20:00, on Zulip):

I've not really thought of a better way

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

than having UserAssertTy

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

have some kind of pattern-like thing

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

instead of just a simple variable

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

I was hoping to come up with something clever :)

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

but it seems like that is actually not very hard

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

well, maybe

nikomatsakis (Aug 07 2018 at 20:01, on Zulip):

there is an interesting question actually

nikomatsakis (Aug 07 2018 at 20:02, on Zulip):

if you have e.g.

nikomatsakis (Aug 07 2018 at 20:02, on Zulip):
let x: &'static u32;

x = &22;
nikomatsakis (Aug 07 2018 at 20:02, on Zulip):

is that annotation meaningful .. at all?

nikomatsakis (Aug 07 2018 at 20:02, on Zulip):

in particular, with the liveness rules

nikomatsakis (Aug 07 2018 at 20:02, on Zulip):

if you had

nikomatsakis (Aug 07 2018 at 20:02, on Zulip):
let mut x: &'static u32 = &22;

...

x = &44; //
nikomatsakis (Aug 07 2018 at 20:03, on Zulip):

then the second x = &44 is in some sense a kind of "different type"

nikomatsakis (Aug 07 2018 at 20:03, on Zulip):

well, that's a bad example

nikomatsakis (Aug 07 2018 at 20:04, on Zulip):

well, nm

nikomatsakis (Aug 07 2018 at 20:04, on Zulip):

the current system is a bit .. mixed here

nikomatsakis (Aug 07 2018 at 20:04, on Zulip):

in polonius though if you overwrite the whole variable x with a new value

nikomatsakis (Aug 07 2018 at 20:04, on Zulip):

then the previous value woudl be completely forgotten

nikomatsakis (Aug 07 2018 at 20:05, on Zulip):

so e.g. in that example above

nikomatsakis (Aug 07 2018 at 20:05, on Zulip):

the second value (&44) assigned to x would not be required to have 'static lifetime

nikomatsakis (Aug 07 2018 at 20:05, on Zulip):

at least, unless we add some special rule (which actually exists today) to force it to be the case

nikomatsakis (Aug 07 2018 at 20:05, on Zulip):

...anyway, I'm rambling

nikomatsakis (Aug 07 2018 at 20:06, on Zulip):

shall we call it?

nikomatsakis (Aug 07 2018 at 20:06, on Zulip):

I'm going to post an update to internals I think and tweet afresh to try and get some new blood :)

davidtwco (Aug 07 2018 at 20:06, on Zulip):

Another successful meeting.

nikomatsakis (Aug 07 2018 at 20:18, on Zulip):

oh, something else I wanted to bring up:

@pnkfelix moved to "stabilize" NLL on the main tracking issue #43234. I've raised a few points there about minor things that I would like to confirm before we do so. But in any case please do go and take a look.

nikomatsakis (Aug 07 2018 at 22:02, on Zulip):

hmm something else that just occurred to me: it's really in our interest to migrate all compile-fail tests to ui tests

nikomatsakis (Aug 07 2018 at 22:06, on Zulip):

right now I think we are just not checking that NLL and non-NLL behave consistently for those tests?

Last update: Nov 21 2019 at 15:00UTC