Stream: wg-async-foundations

Topic: meeting 2019.03.19


nikomatsakis (Mar 19 2019 at 17:07, on Zulip):

Hey @WG-async-await -- meeting soon =)

I'm running a bit behind today. Feel free to start without me, though, if somebody else wants to take the reins.

nikomatsakis (Mar 19 2019 at 17:07, on Zulip):

From last meeting:

davidtwco (Mar 19 2019 at 17:09, on Zulip):

To slightly update the above, #55809 ended up being a no-op as it was already fixed, but then some issues cropped up with #54716 and I'm still working on that.

nikomatsakis (Mar 19 2019 at 17:16, on Zulip):

OK, I'm here, sorry.

Taylor Cramer (Mar 19 2019 at 17:16, on Zulip):

np!

Taylor Cramer (Mar 19 2019 at 17:17, on Zulip):

I don't think I have anything to update here other than that I've opened https://github.com/rust-lang/rust/pull/59286

nikomatsakis (Mar 19 2019 at 17:17, on Zulip):

Let's go in rev order I guess =)

Taylor Cramer (Mar 19 2019 at 17:17, on Zulip):

I guess we could chat about how we want to go about landing that (i.e. do we want to go ahead and land it with more tests but without yet fixing the existential bug, given that it fixes a number of the other lifetime-related errors?)

nikomatsakis (Mar 19 2019 at 17:18, on Zulip):

You saw my comments in this topic?

nikomatsakis (Mar 19 2019 at 17:18, on Zulip):

(Regarding extending inference)

Taylor Cramer (Mar 19 2019 at 17:18, on Zulip):

I did, yeah

nikomatsakis (Mar 19 2019 at 17:18, on Zulip):

I guess we could chat about how we want to go about landing that (i.e. do we want to go ahead and land it with more tests but without yet fixing the existential bug, given that it fixes a number of the other lifetime-related errors?)

I'd be inclined to do so, yes

nikomatsakis (Mar 19 2019 at 17:18, on Zulip):

I've not read it in detail, but it seems like progress, and it feels better to isolate out the lifetime inference changes needed to fix the full bug

Taylor Cramer (Mar 19 2019 at 17:18, on Zulip):

k-- the one sad thing about that is that it'd be a regression in the error message you get when you have multiple argument-position lifetimes

nikomatsakis (Mar 19 2019 at 17:19, on Zulip):

well, maybe we can improve the error message?

Taylor Cramer (Mar 19 2019 at 17:19, on Zulip):

because today it explicitly tells you you can't do that in async fn, but after this change it's "existential type can't do the thing"

nikomatsakis (Mar 19 2019 at 17:19, on Zulip):

yeah, that's not great. Maybe we can fix that.

Taylor Cramer (Mar 19 2019 at 17:19, on Zulip):

perhaps we could amend that error message to mention async fn or tag the existential type as having come from async fn to provide an appropriate message

nikomatsakis (Mar 19 2019 at 17:20, on Zulip):

right

nikomatsakis (Mar 19 2019 at 17:20, on Zulip):

let's discuss it I guess in the topic, but that'd be my inclination

Taylor Cramer (Mar 19 2019 at 17:20, on Zulip):

sg

nikomatsakis (Mar 19 2019 at 17:20, on Zulip):

tmandry is continuing #52924

nikomatsakis (Mar 19 2019 at 17:20, on Zulip):

Not sure if @tmandry is here, I didn't see much activity here though?

tmandry (Mar 19 2019 at 17:21, on Zulip):

No, got caught up in other work, but plan to spend significant time on that this week

nikomatsakis (Mar 19 2019 at 17:21, on Zulip):

cool

nikomatsakis (Mar 19 2019 at 17:22, on Zulip):

davidtwco is on #55809

So @davidtwco probably need reviewing here -- they also uncovered a tricky issue that seems unrelated to async fn, where the drop order is kind of inconsistent between patterns in function arguments and patterns in let bindings.

nikomatsakis (Mar 19 2019 at 17:22, on Zulip):

There...may not be a ton we can do about this.

nikomatsakis (Mar 19 2019 at 17:22, on Zulip):

That feels like a conversation we should surface somewhere else but I'm not really sure exactly where to surface it to

nikomatsakis (Mar 19 2019 at 17:23, on Zulip):

Still, I think that the PR is probably the right approach, if I were going to name the bug, i'd probably put it on the way the drop order from fn patterns

davidtwco (Mar 19 2019 at 17:23, on Zulip):

Well, #55809 doesn't need reviewing, but my fix for #54716 does, but yeah.

nikomatsakis (Mar 19 2019 at 17:23, on Zulip):

er, sorry, right

nikomatsakis (Mar 19 2019 at 17:23, on Zulip):

@Taylor Cramer you're assigned to the PR btw :) I did sort of start reading it through, but my reviewing bandwidth is pretty limited right now.

davidtwco (Mar 19 2019 at 17:24, on Zulip):

Yeah, I'm struggling to debug a type inference issue that happens with the let bindings that the PR creates, but that previously was working, at which point it introduced a few new errors to a test which I wasn't sure if they should be expected. Otherwise it worked at that point.

davidtwco (Mar 19 2019 at 17:25, on Zulip):

I wrote a big summary comment to try make it easier to get up to speed with what it is doing and what it is missing.

nikomatsakis (Mar 19 2019 at 17:27, on Zulip):

Oh, I see :)

nikomatsakis (Mar 19 2019 at 17:27, on Zulip):

I didn't realize how much more was in that comment

nikomatsakis (Mar 19 2019 at 17:28, on Zulip):

ok, well, next item...?

Giles Cope is on #51751

here there was some discussion, the question is whether it makes sense to do anything here before we add the built-in syntax

nikomatsakis (Mar 19 2019 at 17:29, on Zulip):

I guess the reasoning, @Taylor Cramer, is that even if we lower await foo (or foo.await, etc) to some kind of internal calls, we can give those special spans during HIR lowering, which is relatively easy?

nikomatsakis (Mar 19 2019 at 17:29, on Zulip):

I think what @Esteban K├╝ber suggested of some sort of internal intrinsic could make sense, not really sure. Maybe not worth it.

nikomatsakis (Mar 19 2019 at 17:30, on Zulip):

Seems like we have one new issue filed:

Inconsistency in Send/Sync requirements for async/await #59245

Taylor Cramer (Mar 19 2019 at 17:30, on Zulip):

Yeah, that's another "some temporaries show up in generators that maybe shouldn't"

nikomatsakis (Mar 19 2019 at 17:31, on Zulip):

yeah so really that's the "big issue" that's not being worked on

nikomatsakis (Mar 19 2019 at 17:31, on Zulip):

my feeling there is that we should consider if there is some sort of way to make the current "hybrid check" a bit more precise

nikomatsakis (Mar 19 2019 at 17:32, on Zulip):

even if we eventually remove it

nikomatsakis (Mar 19 2019 at 17:32, on Zulip):

but only if it's easy

Taylor Cramer (Mar 19 2019 at 17:32, on Zulip):

Yeah, it also surfaces in another problem I've seen a few people hit which is that using recursive async fn with FutureObj for indirection is really fragile

Taylor Cramer (Mar 19 2019 at 17:32, on Zulip):

because sometimes it'll decide to make a temporary for the future and fail due to an infinitely-sized type

nikomatsakis (Mar 19 2019 at 17:32, on Zulip):

not sure how urgently to weigh that, probably we should defer it a bit until some of those lifetime work etc is done, but it seems like something we should try to do something about -- I could imagine waiting until april and then scheduling some time to talk about it

nikomatsakis (Mar 19 2019 at 17:33, on Zulip):

because sometimes it'll decide to make a temporary for the future and fail due to an infinitely-sized type

huh

Taylor Cramer (Mar 19 2019 at 17:33, on Zulip):

I think my biggest concern about it is that this exposes a lot of details of MIR and temporaries that maybe aren't stable

nikomatsakis (Mar 19 2019 at 17:33, on Zulip):

what does?

nikomatsakis (Mar 19 2019 at 17:33, on Zulip):

basing the results on MIR?

Taylor Cramer (Mar 19 2019 at 17:33, on Zulip):

generators / async/await!

Taylor Cramer (Mar 19 2019 at 17:33, on Zulip):

And in particular Send/Sync-ness

nikomatsakis (Mar 19 2019 at 17:34, on Zulip):

well, presently the Send and Sync considerations etc are not based on MIR

nikomatsakis (Mar 19 2019 at 17:34, on Zulip):

arguably this is a good thing, for the reasons you pointed out

Taylor Cramer (Mar 19 2019 at 17:34, on Zulip):

Ah, well, whatever bit they're evaluated based on seems to be using a heuristic that isn't quite right

Taylor Cramer (Mar 19 2019 at 17:34, on Zulip):

and I'm concerned that changing that heuristic might be a backcompat-hazard

Taylor Cramer (Mar 19 2019 at 17:36, on Zulip):

unless we have strong reason to believe that the current system's check is clearly more conservative than any future check me might want to adopt

nikomatsakis (Mar 19 2019 at 17:36, on Zulip):

I see. I think it is, but yes, I agree -- and this is arguably a reason not to jump to MIR

nikomatsakis (Mar 19 2019 at 17:37, on Zulip):

we encountered some similar questions in and around NLL

nikomatsakis (Mar 19 2019 at 17:37, on Zulip):

but ok, so let's not try to assign anyone

nikomatsakis (Mar 19 2019 at 17:37, on Zulip):

(yet?)

nikomatsakis (Mar 19 2019 at 17:37, on Zulip):

seems like this week we'll focus on trying to land the PRs that are ongoing, and maybe figure out the inference thing?

nikomatsakis (Mar 19 2019 at 17:38, on Zulip):

e.g.,

nikomatsakis (Mar 19 2019 at 17:38, on Zulip):

(if so, @Taylor Cramer, let's do that in a sec)

nikomatsakis (Mar 19 2019 at 17:39, on Zulip):

thanks y'all

Giles Cope (Mar 19 2019 at 18:11, on Zulip):

Sorry - didn't spot we'd started! Just rounding off that previous PR and having a little investigation on the assigned one.

Last update: Nov 18 2019 at 00:35UTC