Stream: t-compiler

Topic: weekly meeting 2019-03-07 #54818


pnkfelix (Mar 07 2019 at 14:34, on Zulip):

hi @T-compiler/meeting , our weekly meeting will start in about 25 minutes

pnkfelix (Mar 07 2019 at 14:35, on Zulip):

I'm going to start the pre-triage process in another topic on this stream. We'll see how much I get through in time I've allotted...

oli (Mar 07 2019 at 14:36, on Zulip):

for backport polls we can try using the zulip feature /poll foo bar boo

oli (Mar 07 2019 at 14:36, on Zulip):

/poll should we play around with fancy zulip features?

pnkfelix (Mar 07 2019 at 15:01, on Zulip):

Okay hi @T-compiler/meeting its time to start

pnkfelix (Mar 07 2019 at 15:01, on Zulip):

so we'll spend <= 30 minutes on nominated issues and/or results of triage

pnkfelix (Mar 07 2019 at 15:02, on Zulip):

and then we'll hear from @Wesley Wiser about @WG-self-profile and also from @blitzerr about @wg-rfc-2229

mw (Mar 07 2019 at 15:03, on Zulip):

actually, I'll give the update on @WG-self-profile as @Wesley Wiser got pulled into other obligations on short notice

pnkfelix (Mar 07 2019 at 15:03, on Zulip):

(for those not following the pre-triage topic: I didn't finish all the of pre-triage, but I got through enough of it to figure out what we need to discuss here, I hope.)

pnkfelix (Mar 07 2019 at 15:04, on Zulip):

so we have ten nominated T-compiler issues

pnkfelix (Mar 07 2019 at 15:04, on Zulip):

oh wait

pnkfelix (Mar 07 2019 at 15:04, on Zulip):

lets do beta-nominations first

pnkfelix (Mar 07 2019 at 15:04, on Zulip):

I want to make sure we get through those because the I-nominateds often expand to fill all available time

pnkfelix (Mar 07 2019 at 15:05, on Zulip):

(there's a reason beta-noms come first on the agenda)

pnkfelix (Mar 07 2019 at 15:05, on Zulip):

there are only two beta-noms that have not yet been accepted

pnkfelix (Mar 07 2019 at 15:05, on Zulip):

first: " Warning period for detecting nested impl trait" #58608

pnkfelix (Mar 07 2019 at 15:06, on Zulip):

we said last week that we would give this a week for someone to object asychronously

pnkfelix (Mar 07 2019 at 15:06, on Zulip):

@centril objected here but I think they misunderstood my point...?

centril (Mar 07 2019 at 15:07, on Zulip):

@pnkfelix I did?

pnkfelix (Mar 07 2019 at 15:07, on Zulip):

you said its bad to go from hard-error to warning

pnkfelix (Mar 07 2019 at 15:07, on Zulip):

which I agree with

pnkfelix (Mar 07 2019 at 15:07, on Zulip):

but I was trying to say that is what would happen if we do not backport

pnkfelix (Mar 07 2019 at 15:08, on Zulip):

i.e. that was my arguemnt for "if we do not backport, then we should not land this PR at all"

pnkfelix (Mar 07 2019 at 15:08, on Zulip):

but my understanding is that if we can get this PR reviewed, and if we do approve it for backport

pnkfelix (Mar 07 2019 at 15:08, on Zulip):

and it gets into beta during this cycle

pnkfelix (Mar 07 2019 at 15:08, on Zulip):

then we avoid the hard error in stable

pnkfelix (Mar 07 2019 at 15:08, on Zulip):

i.e. stable goes from "bad code is accepted" to "warning cycle" to "hard error"

centril (Mar 07 2019 at 15:09, on Zulip):

oh... but I thought it already was a hard error in stable because it slipped?

pnkfelix (Mar 07 2019 at 15:09, on Zulip):

the PR I was proposing didn't get into Nightly before nightly was promoted to beta

pnkfelix (Mar 07 2019 at 15:09, on Zulip):

that was what I meant by slipped

pnkfelix (Mar 07 2019 at 15:09, on Zulip):

i don't think the problem has made it into stable yet

centril (Mar 07 2019 at 15:10, on Zulip):

@pnkfelix yeah I checked; you are right

pnkfelix (Mar 07 2019 at 15:10, on Zulip):

okay so is it fair to say you don't object to a beta-backport then, at least not on those grounds?)

centril (Mar 07 2019 at 15:10, on Zulip):

@pnkfelix ok; so making it into a C-future-compat warning on beta seems fine

pnkfelix (Mar 07 2019 at 15:10, on Zulip):

okay.

pnkfelix (Mar 07 2019 at 15:10, on Zulip):

I do think I need someone to actually review this

centril (Mar 07 2019 at 15:10, on Zulip):

but... I want us to set dates for when to make it into deny => error

centril (Mar 07 2019 at 15:11, on Zulip):

not "someday"

pnkfelix (Mar 07 2019 at 15:11, on Zulip):

That is, I either need @Zoxc to say "hey I will do the review soonish", or I need someone to volunteer to review PR #58608

pnkfelix (Mar 07 2019 at 15:11, on Zulip):

but that doesn't need to happen synchronously

pnkfelix (Mar 07 2019 at 15:12, on Zulip):

I'm going to go ahead and mark #58608 as beta-accepted based on this discussion, but also note that backport should not proceed until review has been completed

centril (Mar 07 2019 at 15:12, on Zulip):

sgtm, but dates should be set before the PR is merged and the issue is made

pnkfelix (Mar 07 2019 at 15:13, on Zulip):

is there an issue filed about this process problem that @centril implicitly describing?

nikomatsakis (Mar 07 2019 at 15:13, on Zulip):

Not that I know of

nikomatsakis (Mar 07 2019 at 15:13, on Zulip):

but I think it's a good idea to file one

centril (Mar 07 2019 at 15:13, on Zulip):

oh; nope

nikomatsakis (Mar 07 2019 at 15:13, on Zulip):

and I would be willing to do so

nikomatsakis (Mar 07 2019 at 15:14, on Zulip):

As for this particular case, I think setting a deadline is "ok" -- we could say 1 release

nikomatsakis (Mar 07 2019 at 15:14, on Zulip):

that's tighter than I think we want in general

centril (Mar 07 2019 at 15:14, on Zulip):

@pnkfelix you'll also need to make a C-future-compatibility issue based on the template etc.

pnkfelix (Mar 07 2019 at 15:14, on Zulip):

next beta-nom: "Include bounds from promoted constants in NLL" #57202

pnkfelix (Mar 07 2019 at 15:14, on Zulip):

pnkfelix you'll also need to make a C-future-compatibility issue based on the template etc.

hmm okay I thought I saw precedent elsewhere for not creating a fresh issue

pnkfelix (Mar 07 2019 at 15:14, on Zulip):

but I'll go and review.

nikomatsakis (Mar 07 2019 at 15:14, on Zulip):

we normally make a fresh issue

nikomatsakis (Mar 07 2019 at 15:14, on Zulip):

with a clean write-up

nikomatsakis (Mar 07 2019 at 15:14, on Zulip):

there is a template

centril (Mar 07 2019 at 15:15, on Zulip):

@pnkfelix example, https://github.com/rust-lang/rust/issues/57742

nikomatsakis (Mar 07 2019 at 15:15, on Zulip):

so I talked to @Matthew Jasper in some depth

nikomatsakis (Mar 07 2019 at 15:15, on Zulip):

oops

nikomatsakis (Mar 07 2019 at 15:15, on Zulip):

there is a template

https://forge.rust-lang.org/rustc-bug-fix-procedure.html

pnkfelix (Mar 07 2019 at 15:15, on Zulip):

we normally make a fresh issue

(okay; now that issue has been beta-accepted I can justify spending time on that)

nikomatsakis (Mar 07 2019 at 15:15, on Zulip):

next beta-nom: "Include bounds from promoted constants in NLL" #57202

so I talked to @Matthew Jasper in some depth and I remove my objection :)

pnkfelix (Mar 07 2019 at 15:16, on Zulip):

great

nikomatsakis (Mar 07 2019 at 15:16, on Zulip):

I'd still like us to pursue an alternate approach at some point, but I'm comfortable with this one for the time being

pnkfelix (Mar 07 2019 at 15:16, on Zulip):

If anyone else objects to beta-backport of #57202, I invite you to voice your objection

pnkfelix (Mar 07 2019 at 15:16, on Zulip):

but for now I'm going to go ahead and mark as beta-accepted based on discussion (or lack thereof) of the matter from last week

pnkfelix (Mar 07 2019 at 15:17, on Zulip):

we have no stable nominations (thank goodness)

pnkfelix (Mar 07 2019 at 15:17, on Zulip):

so back to nominated issues in ~13 minutes remaining

pnkfelix (Mar 07 2019 at 15:18, on Zulip):

I want to cover the unassigned P-high's first

pnkfelix (Mar 07 2019 at 15:18, on Zulip):

so I'm going to go slightly out of order

pnkfelix (Mar 07 2019 at 15:18, on Zulip):

"Rustc 1.33 stable panicked on a closure inside a closure" #58840

pnkfelix (Mar 07 2019 at 15:18, on Zulip):

this has been pinpointed to "Universes" #55517

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

@nikomatsakis who is good person to assign this to?

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

actually

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

looking at the stack trace

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

I think I'm a good person

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

(At least, I've been wrestling with RegionVid conversion issues.)

pnkfelix (Mar 07 2019 at 15:19, on Zulip):

so I'll follow through on this.

lqd (Mar 07 2019 at 15:20, on Zulip):

(btw the crate in #58840 doesn't build on nightly, so not fixed by the return of the leak check #58592)

pnkfelix (Mar 07 2019 at 15:20, on Zulip):

next nominated P-high unassigned issue: "Derives on deprecated items generate deprecation warnings" #58822

pnkfelix (Mar 07 2019 at 15:21, on Zulip):

This, #58822, needs a volunteer. Seems like it might require knowledge of how lints and macro-expansion/derive interact

nikomatsakis (Mar 07 2019 at 15:21, on Zulip):

I think I'm a good person

@pnkfelix I can try to take a look, also

centril (Mar 07 2019 at 15:21, on Zulip):

@Vadim Petrochenkov perhaps?

pnkfelix (Mar 07 2019 at 15:22, on Zulip):

I feel like @Vadim Petrochenkov is usually good about assigning themselves when they think they are right candidate to resolve problem

pnkfelix (Mar 07 2019 at 15:22, on Zulip):

I could speculatively assign it to them. Or maybe I could assign it to someone else who will know to ask @Vadim Petrochenkov for help?

pnkfelix (Mar 07 2019 at 15:23, on Zulip):

(e.g. even if @Vadim Petrochenkov has knowledge, they may be over-taxed elsewhere right now, and thus better to assign to someone else?)

nikomatsakis (Mar 07 2019 at 15:23, on Zulip):

@pnkfelix is this a regression? do we have a bisection?

pnkfelix (Mar 07 2019 at 15:23, on Zulip):

stable-to-beta regression

pnkfelix (Mar 07 2019 at 15:24, on Zulip):

no one has reported a bisection. So that's an obvious first step

pnkfelix (Mar 07 2019 at 15:24, on Zulip):

.... anyone?

nikomatsakis (Mar 07 2019 at 15:24, on Zulip):

I can try to do the bisection

centril (Mar 07 2019 at 15:24, on Zulip):

maybe @euclio ?

pnkfelix (Mar 07 2019 at 15:25, on Zulip):

I think if we're going to choose between my time or niko's, I should take it

pnkfelix (Mar 07 2019 at 15:25, on Zulip):

I don't know @euclio (?)

nikomatsakis (Mar 07 2019 at 15:25, on Zulip):

well running the bisetion is actually fairly easy

nikomatsakis (Mar 07 2019 at 15:25, on Zulip):

I'm going to see if I can get it going during this meeting :)

pnkfelix (Mar 07 2019 at 15:25, on Zulip):

okay

pnkfelix (Mar 07 2019 at 15:25, on Zulip):

lets move along

pnkfelix (Mar 07 2019 at 15:26, on Zulip):

next nominated unassigned issue is "Implement "pipelined" rustc compilation (compiler side)" #58465

pnkfelix (Mar 07 2019 at 15:26, on Zulip):

During triage I opted not to assign a priority label here

pnkfelix (Mar 07 2019 at 15:26, on Zulip):

because I don't know what to give it

nikomatsakis (Mar 07 2019 at 15:26, on Zulip):

Yeah, it's not that sort of nomination.

nikomatsakis (Mar 07 2019 at 15:27, on Zulip):

It's in some sense a "meta nomination" -- in that I don't actually know where in the process we would discuss this sort of idea. Perhaps an RFC

mw (Mar 07 2019 at 15:27, on Zulip):

might be more of a steering meeting discussion

nikomatsakis (Mar 07 2019 at 15:27, on Zulip):

but I think the idea has promise

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

okay...

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

well I'll leave the nominated tag on it

nikomatsakis (Mar 07 2019 at 15:28, on Zulip):

maybe I'll add it to the steering meeting agenda hackmd

nikomatsakis (Mar 07 2019 at 15:28, on Zulip):

for now at least

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

it seems like we need to decide who is going to drive that work

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

but if that's decided during steering meeting, sounds fine.

centril (Mar 07 2019 at 15:28, on Zulip):

(did we go through beta-nominations?)

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

next unassigned nominated issue is "Rustc should use a variable other than RUST_LOG for env_logger." #57985

pnkfelix (Mar 07 2019 at 15:28, on Zulip):

I tagged this as P-medium a week ago

pnkfelix (Mar 07 2019 at 15:29, on Zulip):

because, well, its not high priority

pnkfelix (Mar 07 2019 at 15:29, on Zulip):

but I wanted to check whether anyone objects to making rustc use RUSTC_LOG (and cargo use CARGO_LOG... and rustdoc use RUSTDOC_LOG?)

nikomatsakis (Mar 07 2019 at 15:29, on Zulip):

I'm fine with it

centril (Mar 07 2019 at 15:30, on Zulip):

Seems objectionable to object ;)

pnkfelix (Mar 07 2019 at 15:30, on Zulip):

this shouldn't need an RFC, should it?

centril (Mar 07 2019 at 15:30, on Zulip):

Not my team but I'd say no

nagisa (Mar 07 2019 at 15:30, on Zulip):

Changing behaviour here feels like changing -Z

pnkfelix (Mar 07 2019 at 15:30, on Zulip):

okay well then it sounds like no one's going to object who's here now.

pnkfelix (Mar 07 2019 at 15:30, on Zulip):

so there's no reason to keep this nominated

pnkfelix (Mar 07 2019 at 15:31, on Zulip):

i.e. we informally approve of this change, and just need to find someone who wants to do it.

pnkfelix (Mar 07 2019 at 15:31, on Zulip):

I'll remove the nominated tag from this and various other bugs that I believe were resolved during pretriage

pnkfelix (Mar 07 2019 at 15:31, on Zulip):

lets move on to WG checkin

pnkfelix (Mar 07 2019 at 15:32, on Zulip):

@mw you said you'd present for @WG-self-profile ?

centril (Mar 07 2019 at 15:32, on Zulip):

@pnkfelix did we go through beta nominations? there are some beta-nominated things not beta-acceptd

varkor (Mar 07 2019 at 15:32, on Zulip):

(the author of the issue might be interested in opening a fix now that it's been accepted)

pnkfelix (Mar 07 2019 at 15:32, on Zulip):

pnkfelix did we go through beta nominations? there are some beta-nominated things not beta-acceptd

I only do T-compiler ones

centril (Mar 07 2019 at 15:32, on Zulip):

oh... some were not labeled as such by mistake it seems

pnkfelix (Mar 07 2019 at 15:32, on Zulip):

i see, there are some that aren't tagged

pnkfelix (Mar 07 2019 at 15:32, on Zulip):

I'll look over that

mw (Mar 07 2019 at 15:33, on Zulip):

/me is ready for the update

pnkfelix (Mar 07 2019 at 15:33, on Zulip):

I'll look over that

(asynchronously. they should wait for next week for discussion at thispoint because I want to move along)

Esteban Küber (Mar 07 2019 at 15:33, on Zulip):

There's one that really needs to get in

Esteban Küber (Mar 07 2019 at 15:33, on Zulip):

And the discussion would be short

Esteban Küber (Mar 07 2019 at 15:34, on Zulip):

We're incorrectly accepting mismatched delims in imported modules without emitting errors

Esteban Küber (Mar 07 2019 at 15:35, on Zulip):

https://github.com/rust-lang/rust/pull/58903

centril (Mar 07 2019 at 15:35, on Zulip):

I triaged them into teams; y'all have: https://github.com/rust-lang/rust/pulls?utf8=%E2%9C%93&q=is%3Aopen+is%3Apr+label%3Abeta-nominated+-label%3Abeta-accepted+label%3At-compiler

pnkfelix (Mar 07 2019 at 15:35, on Zulip):

it hasn't landed in nightly, why does it have to be discussed now ??

centril (Mar 07 2019 at 15:36, on Zulip):

it doesn't; we have plenty of time until promotion

Esteban Küber (Mar 07 2019 at 15:36, on Zulip):

Ok

pnkfelix (Mar 07 2019 at 15:36, on Zulip):

okay thanks

pnkfelix (Mar 07 2019 at 15:36, on Zulip):

@mw take it away

mw (Mar 07 2019 at 15:36, on Zulip):

alright

mw (Mar 07 2019 at 15:37, on Zulip):

So, we are working on a "minimum viable product" for self-profiling.

mw (Mar 07 2019 at 15:37, on Zulip):

The goal for this first milestone is to do profiling for each perf.rlo run and publish per-query performance numbers on a separate comparison page.

mw (Mar 07 2019 at 15:37, on Zulip):

You'll be able to get to this detailed comparison page by clicking on a particular benchmark in the current, regular comparison page.

mw (Mar 07 2019 at 15:37, on Zulip):

This page will show for each query (and things like LLVM optimizations) how much time was spent there and if there are any changes. This should make it a lot simpler to pin-point the source of a given performance regressions.

mw (Mar 07 2019 at 15:38, on Zulip):

There's quite a bit of work to do for that. We have a tracking issue here: https://github.com/rust-lang/rust/issues/58967

mw (Mar 07 2019 at 15:38, on Zulip):

The big items are:

pnkfelix (Mar 07 2019 at 15:38, on Zulip):

will it be for just that build of rustc?

pnkfelix (Mar 07 2019 at 15:38, on Zulip):

or will it be historical data for that query ?

mw (Mar 07 2019 at 15:38, on Zulip):

what do you mean by historical?

pnkfelix (Mar 07 2019 at 15:38, on Zulip):

i.e. runs from previous nightlies

mw (Mar 07 2019 at 15:39, on Zulip):

you usually would compare two builds, like the compare view does now

pnkfelix (Mar 07 2019 at 15:39, on Zulip):

okay thanks

mw (Mar 07 2019 at 15:39, on Zulip):

i.e. you can pick any two builds

mw (Mar 07 2019 at 15:39, on Zulip):

where self-profiling was already enabled of course

mw (Mar 07 2019 at 15:39, on Zulip):

The big TODOs are:

mw (Mar 07 2019 at 15:39, on Zulip):
mw (Mar 07 2019 at 15:39, on Zulip):
mw (Mar 07 2019 at 15:40, on Zulip):
nikomatsakis (Mar 07 2019 at 15:40, on Zulip):

what is overhead now and do we have specific plans there?

mw (Mar 07 2019 at 15:40, on Zulip):

Those will be split up between @Wesley Wiser , @simulacrum , and me, mostly

mw (Mar 07 2019 at 15:40, on Zulip):

the overhead is big (30-50% slowdown)

mw (Mar 07 2019 at 15:40, on Zulip):

and mostly caused by serializing things to JSON

mw (Mar 07 2019 at 15:41, on Zulip):

the overhead of the actual tracking seems to be closer to 5%

mw (Mar 07 2019 at 15:41, on Zulip):

we have plans, let me dig up the issue...

nikomatsakis (Mar 07 2019 at 15:41, on Zulip):

Another question: in the interim, can we use the self-profiling stuff on our own runs?

nikomatsakis (Mar 07 2019 at 15:41, on Zulip):

(And do we have instructions for how to do so?)

mw (Mar 07 2019 at 15:41, on Zulip):

https://github.com/rust-lang/rust/issues/58372

mw (Mar 07 2019 at 15:42, on Zulip):

It can't be used yet

mw (Mar 07 2019 at 15:42, on Zulip):

we need that postprocessing tool first

nikomatsakis (Mar 07 2019 at 15:42, on Zulip):

ah, ok

mw (Mar 07 2019 at 15:42, on Zulip):

i.e. much of the overhead currently is caused by doing event analysis in the compiler

mw (Mar 07 2019 at 15:43, on Zulip):

but my plan is to have a "wrapper" program that invokes rustc and then automatically does the post processing

mw (Mar 07 2019 at 15:44, on Zulip):

The notes from our most recent meeting contain some more information, in case anyone is interested: https://github.com/rust-lang/compiler-team/blob/master/working-groups/self-profile/NOTES.md#2019-03-05-meeting

nikomatsakis (Mar 07 2019 at 15:44, on Zulip):

ok, so it sort of could be used, but there is overhead etc

nikomatsakis (Mar 07 2019 at 15:44, on Zulip):

Would the current plans mean that we can use it on our own runs, even before the perf stuff is up and going?

mw (Mar 07 2019 at 15:44, on Zulip):

well, I think currently we are in a state where it can't be used

mw (Mar 07 2019 at 15:44, on Zulip):

because we removed the analysis from the compiler

nikomatsakis (Mar 07 2019 at 15:44, on Zulip):

Ah ok :)

nikomatsakis (Mar 07 2019 at 15:45, on Zulip):

I am basically thinking about how, given the problems we've had with backtraces on perf etc, it's kind of hard to figure out how to profile the compiler

mw (Mar 07 2019 at 15:45, on Zulip):

yeah

mw (Mar 07 2019 at 15:45, on Zulip):

we could adjust our MVP to not include perf.rlo

blitzerr (Mar 07 2019 at 15:45, on Zulip):

I am all ready :slight_smile:

mw (Mar 07 2019 at 15:46, on Zulip):

otoh, perf.rlo support would provide the best usability

mw (Mar 07 2019 at 15:46, on Zulip):

there's one thing I'd like to discuss

mw (Mar 07 2019 at 15:47, on Zulip):

we'll create a kind of support crate for handling the profiling data

mw (Mar 07 2019 at 15:47, on Zulip):

we need buy-in from the rest of the team for creating the GH project

mw (Mar 07 2019 at 15:47, on Zulip):

within rust-lang

mw (Mar 07 2019 at 15:47, on Zulip):

we seem to have settled on the name "measureme" :)

pnkfelix (Mar 07 2019 at 15:47, on Zulip):

this ties into recent WG-meta discussion, right?

nikomatsakis (Mar 07 2019 at 15:47, on Zulip):

I think we talked before about opening an issue with an FCP?

nikomatsakis (Mar 07 2019 at 15:47, on Zulip):

(I'm :+1: on it, in any case)

nikomatsakis (Mar 07 2019 at 15:48, on Zulip):

We could also just do a "rfcbot poll" to avoid the actual FCP

nikomatsakis (Mar 07 2019 at 15:48, on Zulip):

which seems a bit like overkill

mw (Mar 07 2019 at 15:48, on Zulip):

yes, we kinda need the policy to settle down

pnkfelix (Mar 07 2019 at 15:48, on Zulip):

only problem with that name, and perhaps its deliberate, is that it is a prefix of "measurement"

mw (Mar 07 2019 at 15:48, on Zulip):

it should be read as "measure me"

pnkfelix (Mar 07 2019 at 15:48, on Zulip):

I know

davidtwco (Mar 07 2019 at 15:49, on Zulip):

I guess this is a somewhat relevant time to remind everyone that there's a crates policy draft at compiler-team#19 that I'd love some feedback on. But now, back to your regularly scheduled triage meeting...

mw (Mar 07 2019 at 15:49, on Zulip):

so yes, it's a prefix :)

mw (Mar 07 2019 at 15:49, on Zulip):

ok, I don't want to hold things up here

pnkfelix (Mar 07 2019 at 15:49, on Zulip):

lets open that issue

pnkfelix (Mar 07 2019 at 15:50, on Zulip):

and by "lets"

mw (Mar 07 2019 at 15:50, on Zulip):

I guess we wait for the policy to be finished and do whatever it proposes

pnkfelix (Mar 07 2019 at 15:50, on Zulip):

I mean "you do it"

pnkfelix (Mar 07 2019 at 15:50, on Zulip):

or I guess we could wait for that policy to be established, yes

mw (Mar 07 2019 at 15:50, on Zulip):

where would I open the issue

mw (Mar 07 2019 at 15:50, on Zulip):

rust-lang/rust? compiler-team?

pnkfelix (Mar 07 2019 at 15:51, on Zulip):

its a good Q

mw (Mar 07 2019 at 15:51, on Zulip):

anyway, that's why I want to wait for the policy :)

nikomatsakis (Mar 07 2019 at 15:51, on Zulip):

@mw I thnk rust-lang/rust for now, but I think we should alter our triage searches to include compiler-team :)

nikomatsakis (Mar 07 2019 at 15:51, on Zulip):

well, perhaps to include all of rust-lang

mw (Mar 07 2019 at 15:51, on Zulip):

:+1:

pnkfelix (Mar 07 2019 at 15:51, on Zulip):

the policy doc that @davidtwco linked doesn't attempt to cover the procedure here, from what I can tell in a quick skim

davidtwco (Mar 07 2019 at 15:52, on Zulip):

It just mentions seeking consensus from the team currently. I can flesh that out.

nikomatsakis (Mar 07 2019 at 15:52, on Zulip):

(along those lines, @mw, we should probably start applying T-compiler and I-nominated and other common tags to issues on the compiler team crates)

pnkfelix (Mar 07 2019 at 15:52, on Zulip):

okay so that sounds good @mw ; and you aren't blocked on anything else at this point?

mw (Mar 07 2019 at 15:53, on Zulip):

no, I don't think so

pnkfelix (Mar 07 2019 at 15:53, on Zulip):

lets maybe move along to @blitzerr then, who maybe thought they were getting 15 minutes but in fact they get ... seven

blitzerr (Mar 07 2019 at 15:53, on Zulip):

I can manage with 7 I think :slight_smile:

blitzerr (Mar 07 2019 at 15:54, on Zulip):

So a brief description

blitzerr (Mar 07 2019 at 15:54, on Zulip):

Short Problem statement

Today closures don’t accept the code snippet below because a closure captures the entire composite type foo rather than just foo.b.

    let a = &mut foo.a;
    || &mut foo.b; // Error! cannot borrow `foo`
    somefunc(a);
blitzerr (Mar 07 2019 at 15:54, on Zulip):

The goal is to have that code snippet accepted

nikomatsakis (Mar 07 2019 at 15:55, on Zulip):

(c.f. RFC #2229)

blitzerr (Mar 07 2019 at 15:55, on Zulip):
blitzerr (Mar 07 2019 at 15:56, on Zulip):

Actually people can read ahead of my typing and peep into the doc I prepared for the meeting

blitzerr (Mar 07 2019 at 15:56, on Zulip):

So now where we are

blitzerr (Mar 07 2019 at 15:57, on Zulip):

Step 1 is implemented but some tests are failing.

blitzerr (Mar 07 2019 at 15:57, on Zulip):

I am working on it. Had a meeting with @nikomatsakis

nikomatsakis (Mar 07 2019 at 15:57, on Zulip):

I would maybe a give a slightly higher-level view -- basically, we broke it down into steps. Most of the steps involve refactoring the bits of the compiler that assume that each upvar in a closure corresponds to one captured value (notably step 1 and 2)

blitzerr (Mar 07 2019 at 15:57, on Zulip):

Sure

nikomatsakis (Mar 07 2019 at 15:58, on Zulip):

(and current status is that we're in the midst of doing those refactorings, as @blitzerr was already working on this for some time)

pnkfelix (Mar 07 2019 at 15:58, on Zulip):

the step 4

pnkfelix (Mar 07 2019 at 15:58, on Zulip):

"logical vs actual borrows"

pnkfelix (Mar 07 2019 at 15:58, on Zulip):

I take it "actual borrows" means, like, pointers in the generated code?

pnkfelix (Mar 07 2019 at 15:59, on Zulip):

/me tends to think of borrows as being a logical/abstract semantic notion anyway. Though maybe MIRI disagrees with that point-of-view.

nikomatsakis (Mar 07 2019 at 15:59, on Zulip):

Yeah, so one of the open areas that we've presently opted to defer, is that if you have a closure like

|| f(x.foo, x.bar)

you might want the compiler to know that the closure uses only x.foo and x.bar (and not x.baz) but for the closure to actually just have one field at runtime, which is a pointer to x.

blitzerr (Mar 07 2019 at 15:59, on Zulip):

Those were some Optimization ideas that Niko had for post feature. @nikomatsakis would you elaborate ?

nikomatsakis (Mar 07 2019 at 16:00, on Zulip):

In our meeting, we dug some into the options on how to do this

pnkfelix (Mar 07 2019 at 16:00, on Zulip):

right. in essence, we don't want to regress the actual size of the environments carried by closures at runtime as part of this

nikomatsakis (Mar 07 2019 at 16:00, on Zulip):

ideally no, but I think at first we will (but perhaps only with feature-gate enabled)

blitzerr (Mar 07 2019 at 16:00, on Zulip):

That's the idea

nikomatsakis (Mar 07 2019 at 16:01, on Zulip):

one interesting idea is that we could eventually solve this constraint in a nice way if we extend the borrow checker to have a way of expressing "borrow but only giving permission for some sub-paths"

pnkfelix (Mar 07 2019 at 16:01, on Zulip):

ooh, interesting

nikomatsakis (Mar 07 2019 at 16:01, on Zulip):

i.e., taking a crack at the interprocedural conflict problem, but perhaps only internal to the compiler + closure desugaring

pnkfelix (Mar 07 2019 at 16:02, on Zulip):

yes that is a nice path for us to explore

nikomatsakis (Mar 07 2019 at 16:02, on Zulip):

which might be a good way to let us experiment with the "foundations" of said feature without having to debate how to expose it to users yet

pnkfelix (Mar 07 2019 at 16:02, on Zulip):

okay well I'm thrilled to see progress here

pnkfelix (Mar 07 2019 at 16:02, on Zulip):

but we're also at an hour

nikomatsakis (Mar 07 2019 at 16:02, on Zulip):

one thing we found in the meeting is that some of the obvious "hacks" we might do to solve this problem without a proper fix don't really work (notably, optimizing the MIR after the fact)

pnkfelix (Mar 07 2019 at 16:02, on Zulip):

@blitzerr is there anything you need assistance with?

blitzerr (Mar 07 2019 at 16:02, on Zulip):

Not at the moment

varkor (Mar 07 2019 at 16:02, on Zulip):

this might be a little off-topic, but this WG seems focused on a much smaller surface area than most of the other WGs — is there a reason this RFC benefits from the WG structure more than others?

nikomatsakis (Mar 07 2019 at 16:03, on Zulip):

My sense is that most RFCs should have a working group:)

blitzerr (Mar 07 2019 at 16:03, on Zulip):

I think just for tracking purposes. I am the only one in the wg @varkor

pnkfelix (Mar 07 2019 at 16:03, on Zulip):

yeah I get impression that we are experimenting with development/procedural methodologies

varkor (Mar 07 2019 at 16:04, on Zulip):

right, that makes sense

pnkfelix (Mar 07 2019 at 16:04, on Zulip):

if it turns out that this is too much overhead, we will hopefully recognize that and learn from it

pnkfelix (Mar 07 2019 at 16:04, on Zulip):

Not at the moment

okay great

nikomatsakis (Mar 07 2019 at 16:05, on Zulip):

(That said, I do think that this RFC involves more experimentation than some, at least around that final question of how to optimize the closure representation)

pnkfelix (Mar 07 2019 at 16:05, on Zulip):

with that, I have learned that i must rush off to fetch my :dog: and walk them on route to pick up my toddler :children_crossing:

pnkfelix (Mar 07 2019 at 16:05, on Zulip):

bye all

blitzerr (Mar 07 2019 at 16:06, on Zulip):

:wave:

Last update: Nov 21 2019 at 14:55UTC