Stream: t-compiler

Topic: async-await


nikomatsakis (Feb 22 2019 at 17:08, on Zulip):

So @Taylor Cramer what I was saying in the call was that I feel like, from the impl POV, I'd feel better if we had a "plan" for how we were going to maintain the feature and fix the bugs. I'm a bit nervous about stabilizing and then having to scramble to fix bugs that are now exposed to stable code

nikomatsakis (Feb 22 2019 at 17:09, on Zulip):

It seems to me like this was a big hole in our planning at the all hands, in that this is a major feature effort that you've been carrying solo and sort of flew under my radar :(

nikomatsakis (Feb 22 2019 at 17:09, on Zulip):

(Which is to your credit that I've not had to notice it very much -- well you + @Zoxc, since it's mostly desugaring to generators)

nikomatsakis (Feb 22 2019 at 17:15, on Zulip):

(cc @boats)

Taylor Cramer (Feb 22 2019 at 17:58, on Zulip):

@nikomatsakis Is there a "plan" similar to what you have in mind that we've had for previous features?

Taylor Cramer (Feb 22 2019 at 18:09, on Zulip):

(asking because I think it'd be helpful for getting an idea of what sort of thing you have in mind)

Taylor Cramer (Feb 22 2019 at 18:10, on Zulip):

IMO previously it has felt more comfortable because the person who implemented the feature probably wouldn't have had as high of latency in fixing bugs as I have at the moment...

nikomatsakis (Feb 22 2019 at 18:11, on Zulip):

@Taylor Cramer Not necessarily. I don't really mean a "plan" as a written document per se, mostly that we feel like we know how we plan to address the outstanding bugs and feel comfortable about it.

nikomatsakis (Feb 22 2019 at 18:11, on Zulip):

But also we've traditionally been not very good at this

nikomatsakis (Feb 22 2019 at 18:12, on Zulip):

We said during the triage that there were kind of two categories of bugs: those where we sort of have no idea what is going on, and those where we have a vague plan to fix

nikomatsakis (Feb 22 2019 at 18:12, on Zulip):

Particularly around the lifetime issues it seems like that plan is maybe a bit too vague

nikomatsakis (Feb 22 2019 at 18:13, on Zulip):

I guess it'd be good to dig into those issues that are a bit unknown and see if we can diagnose some of their causes

Taylor Cramer (Feb 22 2019 at 18:14, on Zulip):

@nikomatsakis yeah, the biggest thing that worries me about the lifetimes issue is that the only plan I have that starts looking like a "correct" implementation would basically re-implement lifetime elision during lowering

nikomatsakis (Feb 22 2019 at 18:16, on Zulip):

OK. I'm trying to decide a bit what to do with myself this afternoon. Feeling kind of drained from a long week. Maybe I'll dig into some of those bugs a bit, particularly the weird ICE-y ones

nikomatsakis (Feb 22 2019 at 18:16, on Zulip):

and/or put a bit of thought into this

nikomatsakis (Feb 22 2019 at 18:17, on Zulip):

One thing that is a bit unknown for me: do we think maybe we want to try to make a more "native" implementation?

nikomatsakis (Feb 22 2019 at 18:27, on Zulip):

I'm not 100% sure what that means, but I feel like it's been tossed about a few times

nikomatsakis (Feb 22 2019 at 18:27, on Zulip):

Is it just a matter of error messages?

nikomatsakis (Feb 22 2019 at 18:27, on Zulip):

@Taylor Cramer maybe we should make an async-await stream..?

Taylor Cramer (Feb 22 2019 at 18:45, on Zulip):

I'm not sure I know what a more "native" implementation would look like

Taylor Cramer (Feb 22 2019 at 18:45, on Zulip):

"Native" to me sounds like "touches more parts of the compiler after lowering"

nikomatsakis (Feb 22 2019 at 18:50, on Zulip):

I'm also not sure. I feel like the current, generator-based lowering feels a lot like what we want -- the main thing is probably the macro that expands to yield being a problem

nikomatsakis (Feb 22 2019 at 18:50, on Zulip):

i.e., if we had a keyword, we could leave some span hints and things so that we know to customize error messages

nikomatsakis (Feb 22 2019 at 18:51, on Zulip):

I guess one case might have to do with the error message around the return type hints and so forth, but I feel like we can still thread that info through by lowering in careful ways, or other small tweaks

nikomatsakis (Feb 22 2019 at 18:52, on Zulip):

as an aside, I'm thinking we should make a stream for async-await, at minimum, and I'd actually like to try and do a "real" working group -- meaning basically that we establish a meeting time, and try to start drawing up a plan for the remaining issues etc, and kind of reach out to some people to help.

Given the state of the impl, maybe we don't want to reach out to totally new hackers, but I bet some "journeypeople" like @davidtwco, @Santiago Pastorino, or others might be interested.

nikomatsakis (Feb 22 2019 at 18:53, on Zulip):

I'm not really clear on what process we should/would use for "new working groups" =) but I feel like this is obviously something that we as a project are trying to ship so it makes sense.

nikomatsakis (Feb 22 2019 at 18:54, on Zulip):

Let me just rope in @T-compiler I guess -- I'm discussing here that I think we want to have an "async-await working group", focused on the work needed to ship the async fn feature. This work has heretofore been done primarily by @Taylor Cramer but it feels like a clear objective, one that we just kind of overlooked in the list.

Seeing as we're still in this primordial phase, I don't have a clear picture on how to "request" to start a WG -- is there any objection to me "creating" the WG (i.e., making a template, making a Zulip stream, etc)?

Esteban Küber (Feb 22 2019 at 19:24, on Zulip):

Re: diagnostics, the await macro could be turned into an intrinsic which would buy you as much control as having the stabilized keyword.

Esteban Küber (Feb 22 2019 at 19:25, on Zulip):

It'd be a good idea to do so regardless because the only thing that would have to change once the syntax dust settles would be the parser.

Taylor Cramer (Feb 22 2019 at 20:30, on Zulip):

I also think that the issues around yield will disappear quickly when we decide on an await-keyword-based syntax and implement it, and I think the desugaring to yield should be relatively easy to hide from the user

Taylor Cramer (Feb 22 2019 at 20:31, on Zulip):

just as the desugaring of ? to a match is fairly transparent

nikomatsakis (Feb 22 2019 at 20:31, on Zulip):

right

Taylor Cramer (Feb 22 2019 at 20:36, on Zulip):

I'm much more concerned about the implementation and diagnostics around the lifetime issues

nikomatsakis (Feb 25 2019 at 18:44, on Zulip):

OK, so nobody raised any objections

nikomatsakis (Feb 25 2019 at 18:45, on Zulip):

@Taylor Cramer shall we schedule some time to develop an async-await impl problem roadmap? I would like to kind of place the bugs that we found in that triage in an order and maybe dig into the them .. I imagine the lifetime limitations are sort of top priority, so we could probably do the "Pre-triage" here in Zulip and use a call to really dig into the details?

Taylor Cramer (Feb 25 2019 at 19:07, on Zulip):

@nikomatsakis sure, I'd be happy to meet again to talk through the impl schedule

Taylor Cramer (Feb 25 2019 at 19:07, on Zulip):

Although I think I'd actually put the drop-order-of-arguments stuff above the lifetime issues in terms of priority

Taylor Cramer (Feb 25 2019 at 19:07, on Zulip):

since that's a more serious backcompat hazard, I think

nikomatsakis (Feb 25 2019 at 20:11, on Zulip):

@Taylor Cramer indeed, though it seems .. well, I guess there's probably some impl questions there, in terms of how to achieve whatever it is that we want, but I'd like to first know what we think we want

nikomatsakis (Feb 25 2019 at 20:11, on Zulip):

I have a meta question on that point actually

nikomatsakis (Feb 25 2019 at 20:11, on Zulip):

can you think of async fn in terms of a desugaring to async blocks?

nikomatsakis (Feb 25 2019 at 20:12, on Zulip):

(In general, my personal preference for these sorts of questions is to establish a definite desugaring, and try to answer questions of the semantics in terms of that desugaring)

nikomatsakis (Feb 25 2019 at 22:00, on Zulip):

OK, I created a calendar event for an investigation of various issues tomorrow. We should probably decide which ones to dig into =)

Last update: Nov 22 2019 at 04:35UTC