Stream: wg-async-foundations

Topic: weekly meeting 2019.09.03


nikomatsakis (Sep 03 2019 at 17:02, on Zulip):

Hey @WG-async-foundations =)

nikomatsakis (Sep 03 2019 at 17:03, on Zulip):

So last week we were doing some triage and discussion about "async-await is stable, now what?"

nikomatsakis (Sep 03 2019 at 17:04, on Zulip):

I don't see any fresh uncategorized issues

nikomatsakis (Sep 03 2019 at 17:04, on Zulip):

but there are two blocking issues

nikomatsakis (Sep 03 2019 at 17:04, on Zulip):

one of which I had not seen before

nikomatsakis (Sep 03 2019 at 17:04, on Zulip):

async-await: mutually recursive functions compile sometimes #64004

nikomatsakis (Sep 03 2019 at 17:05, on Zulip):

but it looks like @Matthew Jasper has a fix (https://github.com/rust-lang/rust/pull/64038)

nikomatsakis (Sep 03 2019 at 17:05, on Zulip):

temporary lifetime around await is (maybe) unexpectedly short #63832

nikomatsakis (Sep 03 2019 at 17:06, on Zulip):

OK, so, we discussed this in the lang team meeting and @Taylor Cramer was going to leave a comment but I guess they didn't get around to it

nikomatsakis (Sep 03 2019 at 17:06, on Zulip):

the tl;dr was that we decided to align the sync/async semantics

nikomatsakis (Sep 03 2019 at 17:06, on Zulip):

@davidtwco you're assigned to this one -- we think that changing the desugaring will suffice (per @Matthew Jasper's suggestion), did you want to give that a try?

davidtwco (Sep 03 2019 at 17:07, on Zulip):

Unfortunately, I've not had an opportunity to work on this yet (work is very busy right now, there's a milestone at the end of the week). I intend to look at it this week though.

nikomatsakis (Sep 03 2019 at 17:08, on Zulip):

OK

nikomatsakis (Sep 03 2019 at 17:09, on Zulip):

If you'd prefer, we could find someone else

nikomatsakis (Sep 03 2019 at 17:09, on Zulip):

If you're too busy, that is

davidtwco (Sep 03 2019 at 17:09, on Zulip):

I should be able to do it.

nikomatsakis (Sep 03 2019 at 17:10, on Zulip):

there is one other issue currently marked as "blocking", though it's a "soft" sort of blocking

nikomatsakis (Sep 03 2019 at 17:10, on Zulip):

rustdoc renders re-exported async fns incorrectly #63710

nikomatsakis (Sep 03 2019 at 17:10, on Zulip):

It seems like the problem here lies in rustdoc's split, whereby local crates are documented from the AST

nikomatsakis (Sep 03 2019 at 17:11, on Zulip):

but foreign crates come from metadata

nikomatsakis (Sep 03 2019 at 17:11, on Zulip):

and hence foreign crates are seeing the desugared version

nikomatsakis (Sep 03 2019 at 17:11, on Zulip):

this seems like a fairly big "gotcha" especially for facade-like patterns

nikomatsakis (Sep 03 2019 at 17:12, on Zulip):

I guess the obvious fix is to encode some info that the function was originally an "async fn", perhaps -- more generally -- a "original signature" sort of data

nikomatsakis (Sep 03 2019 at 17:12, on Zulip):

although @Esteban K├╝ber proposes another direction:

Should we also consider always documenting Fn() -> impl Future<Output=_> as async Fn() -> _?

nikomatsakis (Sep 03 2019 at 17:12, on Zulip):

not sure what I think about that

nikomatsakis (Sep 03 2019 at 17:12, on Zulip):

"maybe" I guess :)

simulacrum (Sep 03 2019 at 17:13, on Zulip):

fwiw I think _that_ is also somewhat hard so it might be best to encode the asyncness in metadata in some way

nikomatsakis (Sep 03 2019 at 17:15, on Zulip):

yeah I was thinking the same thing

simulacrum (Sep 03 2019 at 17:16, on Zulip):

I personally don't see this as all that blocking though. I can probably allocate some time to investigate this week, though, fwiw

nikomatsakis (Sep 03 2019 at 17:16, on Zulip):

I don't think it's blocking -- it's more of a "nice to have"

simulacrum (Sep 03 2019 at 17:16, on Zulip):

(it's tagged as -Blocking and -Unclear, which is why I ask :)

nikomatsakis (Sep 03 2019 at 17:16, on Zulip):

essentially, looking for things we can do to improve people's first impressions of async-await

nikomatsakis (Sep 03 2019 at 17:16, on Zulip):

heh well yeah I abused the tags

nikomatsakis (Sep 03 2019 at 17:17, on Zulip):

which brings me to the last topic -- last week we did a triage where we started going through all the "deferred" issues, looking for things to try and address sooner rather than later, and just to get a feel for what they were and maybe hints for how to label them in the future

nikomatsakis (Sep 03 2019 at 17:17, on Zulip):

we made it about 50% of the way

nikomatsakis (Sep 03 2019 at 17:17, on Zulip):

this paper doc includes some notes, and there was a video (see the end of last week's meeting)

nikomatsakis (Sep 03 2019 at 17:18, on Zulip):

One thing we identified is that we may want #[inline] to be an error (though I see in the doc that @centril maybe doesn't agree). In short because it's not really clear what it should mean, and right now it doesn't do much.

nikomatsakis (Sep 03 2019 at 17:19, on Zulip):

(On a related note, we may want to mark all async fn "constructors" as #[inline])

nikomatsakis (Sep 03 2019 at 17:19, on Zulip):

but the most important diagnostic issue we identified was trying to improve our error messages when a future is not Send -- right now you get this error late, at the point of use, but often we could localize it effectively to the future definition (i.e., we have enough data available)

nikomatsakis (Sep 03 2019 at 17:19, on Zulip):

maybe I'll open some issues to track those

nikomatsakis (Sep 03 2019 at 17:20, on Zulip):

is anybody who is present interested in this diagnostic issue in particular? I think I could try to leave some notes as to how to go about it, though it would take a bit of time for me to think about

nikomatsakis (Sep 03 2019 at 17:20, on Zulip):

also, we should I guess spend some time going over the rest of the issues

nikomatsakis (Sep 03 2019 at 17:21, on Zulip):

this is an example of a diagnostic fail, incidentally :)

nikomatsakis (Sep 03 2019 at 17:25, on Zulip):

Opened https://github.com/rust-lang/rust/issues/64130

nikomatsakis (Sep 03 2019 at 17:25, on Zulip):

I marked it as blocking, I'll assign to myself to try and leave some mentoring notes

nikomatsakis (Sep 03 2019 at 17:25, on Zulip):

It's not really blocking :)

nikomatsakis (Sep 03 2019 at 17:26, on Zulip):

OK, well, I guess that's it for now. I think we should do another session to finish up the remaining 50% of those issues -- later this week I guess?

Taylor Cramer (Sep 03 2019 at 17:27, on Zulip):

SGTM

Taylor Cramer (Sep 03 2019 at 17:27, on Zulip):

doodle poll part 2?

nikomatsakis (Sep 03 2019 at 17:28, on Zulip):

PS @Giles Cope maybe we'll bump https://github.com/rust-lang/rust/issues/63167 to "blocking" (just so we're tracking it)?

centril (Sep 04 2019 at 01:18, on Zulip):

One thing we identified is that we may want #[inline] to be an error (though I see in the doc that @centril maybe doesn't agree). In short because it's not really clear what it should mean, and right now it doesn't do much.

I do disagree; #[inline] is a hint and it 1) doesn't have to do anything at all, 2) can have its meaning changed whenever we want

centril (Sep 04 2019 at 01:18, on Zulip):

but I think we should not introduce contextual static semantics for it

nikomatsakis (Sep 04 2019 at 19:29, on Zulip):

(Note: moved some comments about whether #[inline] on async fn should be an error to this topic)

Last update: Nov 18 2019 at 01:55UTC