Stream: wg-async-foundations

Topic: weekly meeting 2019.04.16


tmandry (Apr 16 2019 at 17:10, on Zulip):

ping @Taylor Cramer @nikomatsakis, do we have a meeting today?

Taylor Cramer (Apr 16 2019 at 17:10, on Zulip):

I don't have any updates to give, but I'd be happy to chat if you have things

nikomatsakis (Apr 16 2019 at 17:11, on Zulip):

I was just going to come in and ask the same thing :) cc @WG-async-await -- brief meeting?

nikomatsakis (Apr 16 2019 at 17:11, on Zulip):

I'm running a bit late today :)

nikomatsakis (Apr 16 2019 at 17:11, on Zulip):

I did do a quick review of @Giles Cope's PR -- I haven't had time to check if they had responses to my questions

nikomatsakis (Apr 16 2019 at 17:12, on Zulip):

I forget, is there a centralized list of tasks?

nikomatsakis (Apr 16 2019 at 17:14, on Zulip):

I guess we might as well start with a quick triage of "uncategorized issues" -- i.e., not marked as deferred or blocking

nikomatsakis (Apr 16 2019 at 17:14, on Zulip):

async/await assertion failed: unbounded recursion #53249

nikomatsakis (Apr 16 2019 at 17:15, on Zulip):

any idea what's going on here, @Taylor Cramer ?

Taylor Cramer (Apr 16 2019 at 17:15, on Zulip):

nope

nikomatsakis (Apr 16 2019 at 17:16, on Zulip):

seems like we should at least try to investigate?

tmandry (Apr 16 2019 at 17:17, on Zulip):

right, it seems like this should be considered a blocker

nikomatsakis (Apr 16 2019 at 17:18, on Zulip):

so marked

nikomatsakis (Apr 16 2019 at 17:18, on Zulip):

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

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

this is that long-standing problem of getting (more) precise about what we capture

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

I forget if there's another issue for this too?

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

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

nikomatsakis (Apr 16 2019 at 17:20, on Zulip):

maybe mark as a dup?

nikomatsakis (Apr 16 2019 at 17:21, on Zulip):

(I personally think we should try to do something here -- maybe it's not a blocker but I'm not happy with deferring it entirely)

nikomatsakis (Apr 16 2019 at 17:21, on Zulip):

but for now I'll mark it as deferred

tmandry (Apr 16 2019 at 17:22, on Zulip):

agreed, it's definitely not nice

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

I wonder if I should make an AsyncAwait-Nominated label or something

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

to tag things for future discussion

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

otoh it's not like there are so many

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

anyway let's keep moving for the moment

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

async move breaks doc tests #59313

nikomatsakis (Apr 16 2019 at 17:24, on Zulip):

that...is strange

nikomatsakis (Apr 16 2019 at 17:25, on Zulip):

marked as blocking pending investigation and cc'd @QuietMisdreavus and @Guillaume =)

nikomatsakis (Apr 16 2019 at 17:25, on Zulip):

(to help in diagnosing)

nikomatsakis (Apr 16 2019 at 17:25, on Zulip):

async/await: cannot move out of captured variable in an Fn closure #59971

nikomatsakis (Apr 16 2019 at 17:26, on Zulip):

seems...expected

nikomatsakis (Apr 16 2019 at 17:26, on Zulip):

but let me dig a bit more into the example

nikomatsakis (Apr 16 2019 at 17:26, on Zulip):

er, no, no it doesn't

nikomatsakis (Apr 16 2019 at 17:27, on Zulip):

ah, but these are async closures...

nikomatsakis (Apr 16 2019 at 17:27, on Zulip):

@Taylor Cramer I feel like async closures aren't really expected to work right, correct?

nikomatsakis (Apr 16 2019 at 17:27, on Zulip):

whatever right exactly means anyway?

Taylor Cramer (Apr 16 2019 at 17:28, on Zulip):

Yes

Taylor Cramer (Apr 16 2019 at 17:28, on Zulip):

async closures are not a candidate for stabilization

Taylor Cramer (Apr 16 2019 at 17:28, on Zulip):

async blocks, however, do work

nikomatsakis (Apr 16 2019 at 17:28, on Zulip):

ok I'll mark as deferred

tmandry (Apr 16 2019 at 17:29, on Zulip):

I think we skipped #59337 async closures have concrete argument lifetimes

Giles Cope (Apr 16 2019 at 17:29, on Zulip):

Thanks @nikomatsakis I needed that. Will do my best.

nikomatsakis (Apr 16 2019 at 17:30, on Zulip):

@Giles Cope let me know if anything is tricky!

nikomatsakis (Apr 16 2019 at 17:30, on Zulip):

async closures have concrete argument lifetimes #59337

(yes, you're right @tmandry )

nikomatsakis (Apr 16 2019 at 17:30, on Zulip):

however, I guess this is deferred for the same reason, right?

nikomatsakis (Apr 16 2019 at 17:34, on Zulip):

OK, initial triage is done, shall we review the blocking issues?

nikomatsakis (Apr 16 2019 at 17:35, on Zulip):

Ps, I created a dropbox paper to record the steps here

nikomatsakis (Apr 16 2019 at 17:35, on Zulip):

@tmandry looks like we can assign this to you?

Futures involving uninhabited variables are incorrectly considered uninhabited. #59972

tmandry (Apr 16 2019 at 17:36, on Zulip):

Yep that should be closed in #59897

nikomatsakis (Apr 16 2019 at 17:36, on Zulip):

@Taylor Cramer I guess we can't quite close this until we fix the region inference stuff?

async fn should support multiple lifetimes #56238

Taylor Cramer (Apr 16 2019 at 17:36, on Zulip):

Indeed, it does not support multiple lifetimes today

nikomatsakis (Apr 16 2019 at 17:36, on Zulip):

Yep that should be closed in #59897

how is that going, @tmandry?

tmandry (Apr 16 2019 at 17:37, on Zulip):

so, variantful generators are going well, I have some polish steps left to do for debuginfo and cleaning up the code

nikomatsakis (Apr 16 2019 at 17:37, on Zulip):

I guess one question @Taylor Cramer is whether we should make an issue for feature-gating the tricky cases here:

Unused arguments to async fn are dropped too early #54716

or if we should hold off until we have a chance to discuss this a bit more?

Taylor Cramer (Apr 16 2019 at 17:38, on Zulip):

@nikomatsakis I think we should discuss again if we can find a moment in the next lang mtg

Taylor Cramer (Apr 16 2019 at 17:38, on Zulip):

but I think that was the most promising proposal

Taylor Cramer (Apr 16 2019 at 17:38, on Zulip):

(in terms of group consensus)

nikomatsakis (Apr 16 2019 at 17:38, on Zulip):

OK

nikomatsakis (Apr 16 2019 at 17:39, on Zulip):

Similarly, we were talking about taking the initial steps for "Resolve await syntax" #57640 -- most of which are independent from the actual syntax anyway -- maybe we should open an issue on that? (i.e., "implement built-in syntax") and assign it to someone?

nikomatsakis (Apr 16 2019 at 17:39, on Zulip):

I mention a new issue because I'd want one that's just focused on the implementation questions

nikomatsakis (Apr 16 2019 at 17:39, on Zulip):

and not the choice of syntax

nikomatsakis (Apr 16 2019 at 17:39, on Zulip):

the existing one's comment thread is...a bit polluted :)

tmandry (Apr 16 2019 at 17:40, on Zulip):

Re: #52924 (which variantful generators are a part of),
I went ahead and implemented the optimization that @eddyb and I discussed
it uses the MaybeLiveAt dataflow analysis to check for vars that might be StorageLive simultaneously, and prevent them from overlapping

tmandry (Apr 16 2019 at 17:40, on Zulip):

but there's one problem

tmandry (Apr 16 2019 at 17:41, on Zulip):

which is that, even for locals that don't have overlapping scopes (as in the await case), the drop and unwind paths make them appear to be StorageLive at the same time

tmandry (Apr 16 2019 at 17:41, on Zulip):

so we have to deal with that somehow

nikomatsakis (Apr 16 2019 at 17:41, on Zulip):

can you give an example?

GuillaumeGomez (Apr 16 2019 at 17:42, on Zulip):

What do we have to do?

tmandry (Apr 16 2019 at 17:42, on Zulip):

can you give an example?

yeah, here's a gist

tmandry (Apr 16 2019 at 17:43, on Zulip):

just updated to make it slightly less confusing

nikomatsakis (Apr 16 2019 at 17:44, on Zulip):

What do we have to do?

I'd like to know @Guillaume if you have any insight into this issue: " async move breaks doc tests #59313 "

like, what is causing that error? are there some switches I can give to get more information?

tmandry (Apr 16 2019 at 17:45, on Zulip):

anyway, x and y never "really" have storagelive simulataneously, but if you follow the drop and unwind branches to the beginning of bb1, bb3, bb4, or bb6, you will see that we have declared storagelive on both of them at some points

nikomatsakis (Apr 16 2019 at 17:45, on Zulip):

just updated to make it slightly less confusing

@tmandry this should probably be y in the println!, right?

        {
            let y: i32 = 5;
            yield;
            println!("{:?}", x);
}
tmandry (Apr 16 2019 at 17:45, on Zulip):

lol, yes, sorry

nikomatsakis (Apr 16 2019 at 17:45, on Zulip):

anyway, x and y never "really" have storagelive simulataneously, but if you follow the drop and unwind branches to the beginning of bb1, bb3, bb4, or bb6, you will see that we have declared storagelive on both of them at some points

yeah so I think in prticular we don't emit storage-end on unwind paths

nikomatsakis (Apr 16 2019 at 17:45, on Zulip):

this is the problem, right?

tmandry (Apr 16 2019 at 17:45, on Zulip):

yes I believe so

nikomatsakis (Apr 16 2019 at 17:46, on Zulip):

I'm not sure why we don't, I think it's an optimization (less IR) and a simplification (it was annoying to do so)

tmandry (Apr 16 2019 at 17:47, on Zulip):

yeah, I'm thinking changing that may be the way to go

tmandry (Apr 16 2019 at 17:47, on Zulip):

I haven't looked at the relevant code yet though

nikomatsakis (Apr 16 2019 at 17:48, on Zulip):

I guess a more complex analysis might be able to decide it doesn't matter

nikomatsakis (Apr 16 2019 at 17:48, on Zulip):

not sure if that'd be worth the trouble

nikomatsakis (Apr 16 2019 at 17:48, on Zulip):

the reasoning would be something like "we didn't storage-dead, but we never touch that slot again..."

nikomatsakis (Apr 16 2019 at 17:49, on Zulip):

I didn't quite follow how you setup the analysis in the first place

nikomatsakis (Apr 16 2019 at 17:49, on Zulip):

anyway, we can dig into that elsewhere

tmandry (Apr 16 2019 at 17:49, on Zulip):

ok, I can go into more detail in the topic for this issue

nikomatsakis (Apr 16 2019 at 17:49, on Zulip):

ok, I probably got to run, this meeting is running over for me :) I guess .. people mostly have stuff to do? we didn't discuss the syntax question, and @Taylor Cramer I don't know if you've done any investigation into the region solver?

nikomatsakis (Apr 16 2019 at 17:50, on Zulip):

@tmandry cool, maybe ping me? :)

Taylor Cramer (Apr 16 2019 at 17:50, on Zulip):

@nikomatsakis no, I have not

Taylor Cramer (Apr 16 2019 at 17:50, on Zulip):

@nikomatsakis I was planning to work on the syntax implementation here soon

Taylor Cramer (Apr 16 2019 at 17:50, on Zulip):

I don't anticipate it being particularly difficult

Taylor Cramer (Apr 16 2019 at 17:51, on Zulip):

@nikomatsakis WRT the regions stuff, I can do some poking around-- I thought you had indicated you wanted to do some investigation yourself first, but maybe I misunderstood

Taylor Cramer (Apr 16 2019 at 17:51, on Zulip):

(In any case, I wouldn't have had time until now :) )

nikomatsakis (Apr 16 2019 at 17:52, on Zulip):

@Taylor Cramer created https://github.com/rust-lang/rust/issues/60016 and assigned to you :)

Taylor Cramer (Apr 16 2019 at 17:52, on Zulip):

sg, thanks

nikomatsakis (Apr 16 2019 at 17:52, on Zulip):

nikomatsakis WRT the regions stuff, I can do some poking around-- I thought you had indicated you wanted to do some investigation yourself first, but maybe I misunderstood

no, you're not wrong, I just wanted to check. I thikn I will do that later today

nikomatsakis (Apr 16 2019 at 17:52, on Zulip):

I am adding something to my calendar so I don't forget

nikomatsakis (Apr 16 2019 at 17:52, on Zulip):

I'll leave some notes on the issue

GuillaumeGomez (Apr 17 2019 at 21:20, on Zulip):

Answered on the issue, it's simpler to follow this way. :)

Last update: Nov 18 2019 at 01:35UTC