Stream: wg-async-foundations

Topic: meeting 2020.01.14


tmandry (Jan 14 2020 at 17:58, on Zulip):

@WG-async-foundations meeting time! (well, almost)

tmandry (Jan 14 2020 at 18:00, on Zulip):

ok, let's get started

tmandry (Jan 14 2020 at 18:00, on Zulip):

Uncategorized issues

tmandry (Jan 14 2020 at 18:01, on Zulip):

Error message for closure with async block needs improvement #68119

nikomatsakis (Jan 14 2020 at 18:02, on Zulip):

hmm

tmandry (Jan 14 2020 at 18:02, on Zulip):

this one is diagnostics, so I think we should promote to OnDeck (but not Focus just yet, since the error is still correct)

nikomatsakis (Jan 14 2020 at 18:03, on Zulip):

ok

nikomatsakis (Jan 14 2020 at 18:03, on Zulip):

it is pretty complex

nikomatsakis (Jan 14 2020 at 18:04, on Zulip):

it's mostly this "move out of foo occurs here" thing

nikomatsakis (Jan 14 2020 at 18:04, on Zulip):

(right?)

nikomatsakis (Jan 14 2020 at 18:04, on Zulip):

like, for closures, we don't really mention that the move "occurs" when the closure is created

nikomatsakis (Jan 14 2020 at 18:04, on Zulip):

we just show you the point within the closure that's a problem

tmandry (Jan 14 2020 at 18:05, on Zulip):

(yes)

tmandry (Jan 14 2020 at 18:05, on Zulip):

also removing the mention of generators

tmandry (Jan 14 2020 at 18:05, on Zulip):

and getting rid of the extra stuff at the bottom.. so there are like 3 things in this issue :)

tmandry (Jan 14 2020 at 18:06, on Zulip):

adding the .as_ref() suggestion is probably going to be the most impactful bit though

tmandry (Jan 14 2020 at 18:07, on Zulip):

moving on

tmandry (Jan 14 2020 at 18:07, on Zulip):

Explanation for why future is not Send is wrong #68112

tmandry (Jan 14 2020 at 18:08, on Zulip):

I promise these aren't all my issues ;)

nikomatsakis (Jan 14 2020 at 18:08, on Zulip):

I'm not sure if your diagnosis is correct

nikomatsakis (Jan 14 2020 at 18:09, on Zulip):

that is, is this possibly a case where we are overapproximating what gets captured?

nikomatsakis (Jan 14 2020 at 18:09, on Zulip):

I guess specifically the question is 'what edit fixes it"

tmandry (Jan 14 2020 at 18:09, on Zulip):

maybe

nikomatsakis (Jan 14 2020 at 18:10, on Zulip):

yeah I'm not sure

nikomatsakis (Jan 14 2020 at 18:10, on Zulip):

I tried some edits in playground and didn't definitely answer my own question :)

tmandry (Jan 14 2020 at 18:10, on Zulip):

it's confusing in any case

tmandry (Jan 14 2020 at 18:11, on Zulip):

and contradicts my mental model of the semantics, at least

nikomatsakis (Jan 14 2020 at 18:11, on Zulip):

so

tmandry (Jan 14 2020 at 18:11, on Zulip):

which to me gives it higher priority than the last issue

nikomatsakis (Jan 14 2020 at 18:11, on Zulip):

I sort of remember when I was reading the code here

nikomatsakis (Jan 14 2020 at 18:11, on Zulip):

that I felt like it was not correctly identifying the yield that the value was 'live over'

nikomatsakis (Jan 14 2020 at 18:11, on Zulip):

that might fit with this error?

nikomatsakis (Jan 14 2020 at 18:11, on Zulip):

e.g., this edit

tmandry (Jan 14 2020 at 18:11, on Zulip):

yeah, that could be it

nikomatsakis (Jan 14 2020 at 18:12, on Zulip):
fn main() {
    let send_fut = async {
        let non_send_fut = make_non_send_future();
        let _ = non_send_fut.await;
        //ready(0).await;
    };
    require_send(send_fut);
}
nikomatsakis (Jan 14 2020 at 18:12, on Zulip):

gives an error that highlights non_send_fut.await

tmandry (Jan 14 2020 at 18:12, on Zulip):

yep, I see what you were getting at now

nikomatsakis (Jan 14 2020 at 18:12, on Zulip):

I guess it's still not really true that non_send_fut might be used later

nikomatsakis (Jan 14 2020 at 18:12, on Zulip):

though we might think it's true

nikomatsakis (Jan 14 2020 at 18:12, on Zulip):

anyway, I'll leave some quick thoughts on the issue

tmandry (Jan 14 2020 at 18:13, on Zulip):

(although I still think that jives with the issue description)

tmandry (Jan 14 2020 at 18:13, on Zulip):

ok, I'll promote to OnDeck for now

tmandry (Jan 14 2020 at 18:14, on Zulip):

rustc panics when compiling code that uses tokio's LocalSet #68109

tmandry (Jan 14 2020 at 18:15, on Zulip):

there's a comment at the bottom saying this was fixed already

tmandry (Jan 14 2020 at 18:15, on Zulip):

I think we need to add a regression test though

nikomatsakis (Jan 14 2020 at 18:16, on Zulip):

well

nikomatsakis (Jan 14 2020 at 18:16, on Zulip):

it would be nice

nikomatsakis (Jan 14 2020 at 18:16, on Zulip):

but we'd have to make a small one, that'l be hard

tmandry (Jan 14 2020 at 18:16, on Zulip):

(unless it's indeed the exact same issue as #67071 fixed, but still would be nice)

tmandry (Jan 14 2020 at 18:17, on Zulip):

true, it may not be worth prioritizing

tmandry (Jan 14 2020 at 18:18, on Zulip):

I'm thinking of leaving this open and but not putting it OnDeck or anything

nikomatsakis (Jan 14 2020 at 18:18, on Zulip):

I'm semi inclined to close ;)

nikomatsakis (Jan 14 2020 at 18:18, on Zulip):

but I think that's fine too

nikomatsakis (Jan 14 2020 at 18:18, on Zulip):

just tag is as "E-needs-test"

tmandry (Jan 14 2020 at 18:18, on Zulip):

(but worried it'll never get closed :)

nikomatsakis (Jan 14 2020 at 18:18, on Zulip):

you never know

tmandry (Jan 14 2020 at 18:19, on Zulip):

Re-land "add IntoFuture trait and support for await" #67982

tmandry (Jan 14 2020 at 18:20, on Zulip):

we discussed this last time

tmandry (Jan 14 2020 at 18:20, on Zulip):

any thoughts on whether this should be OnDeck?

nikomatsakis (Jan 14 2020 at 18:20, on Zulip):

yeah. this is going to take somebody to focus on it I guess

tmandry (Jan 14 2020 at 18:20, on Zulip):

I'm not really sure how much of a priority this is

nikomatsakis (Jan 14 2020 at 18:21, on Zulip):

Yeah I don't know either. I think it's definitely a "nice to have"

tmandry (Jan 14 2020 at 18:21, on Zulip):

also, the tracking issue #67644 is tagged async-await, I'm just going to mark it as triaged

nikomatsakis (Jan 14 2020 at 18:21, on Zulip):

but it feels distinct from the other on-deck issues, not a "diagnostics" thing

nikomatsakis (Jan 14 2020 at 18:22, on Zulip):

(I guess it's sort of polish of a different kind, in that it enables other libraries to be more polished)

nikomatsakis (Jan 14 2020 at 18:22, on Zulip):

anyway the real question is who might investigate :)

nikomatsakis (Jan 14 2020 at 18:22, on Zulip):

it probably wants someone with a bit more experience in rustc

nikomatsakis (Jan 14 2020 at 18:22, on Zulip):

it's nice that there's a specific test

tmandry (Jan 14 2020 at 18:23, on Zulip):

okay. I'm inclined to tag it OnDeck since this is still "fresh" and we might be close to finishing, but if it goes cold we can demote it later

nikomatsakis (Jan 14 2020 at 18:24, on Zulip):

I agree with that

nikomatsakis (Jan 14 2020 at 18:25, on Zulip):

sorry, got distracted, but I was going to say that it seemed like it should be on-deck

nikomatsakis (Jan 14 2020 at 18:25, on Zulip):

it'd be nice to at least do some investigation

nikomatsakis (Jan 14 2020 at 18:25, on Zulip):

I really want to volunteer but am doubtful I'll have the time

Giles Cope (Jan 14 2020 at 18:25, on Zulip):

#68109 - I'll see if I can cut the repo down to something that might make a test case. (Gradually rust-reduce will get better at doing this stuff)

tmandry (Jan 14 2020 at 18:26, on Zulip):

Focus issues

tmandry (Jan 14 2020 at 18:27, on Zulip):

how are we doing on these?

tmandry (Jan 14 2020 at 18:27, on Zulip):

Unhelpful error messages from borrow checker with async/await #67765

tmandry (Jan 14 2020 at 18:27, on Zulip):

looks like there is a PR

tmandry (Jan 14 2020 at 18:27, on Zulip):

oh, we discussed this last week

nikomatsakis (Jan 14 2020 at 18:27, on Zulip):

there's an open PR, but @Aaron Hill haven't really come to consensus on the strategy, and I haven't had time to investigate too deeply yet

tmandry (Jan 14 2020 at 18:28, on Zulip):

okay

tmandry (Jan 14 2020 at 18:29, on Zulip):

Confusing/incorrect error message with incoherent implementations and async blocks #67651

nikomatsakis (Jan 14 2020 at 18:29, on Zulip):

Ok so I did some investigating

nikomatsakis (Jan 14 2020 at 18:29, on Zulip):

and I think I know what's going wrong

nikomatsakis (Jan 14 2020 at 18:29, on Zulip):

but my first attempt at a fix was insufficient, it's going to take a bit more playing around

nikomatsakis (Jan 14 2020 at 18:29, on Zulip):

in my opinion, the current setup of how we handle generator types in the type_of query is not correct

nikomatsakis (Jan 14 2020 at 18:30, on Zulip):

I'm not sure how difficult it would be to fix, my guess is "not very", just have to kind of push through a few bits of code that need to be patched

nikomatsakis (Jan 14 2020 at 18:30, on Zulip):

I can probably put a bit more time into that

tmandry (Jan 14 2020 at 18:30, on Zulip):

if I understood your comment it sounds like we need to make generators generic over the types they capture, and then unify the type variables at some point...?

nikomatsakis (Jan 14 2020 at 18:30, on Zulip):

they already are generic over that

nikomatsakis (Jan 14 2020 at 18:30, on Zulip):

well

nikomatsakis (Jan 14 2020 at 18:30, on Zulip):

yes, I think they are, unless i'm missing something :)

tmandry (Jan 14 2020 at 18:31, on Zulip):

..well, yeah, I think they are handled the same as closures

tmandry (Jan 14 2020 at 18:31, on Zulip):

I'm a bit rusty on the details

tmandry (Jan 14 2020 at 18:31, on Zulip):

anyway

nikomatsakis (Jan 14 2020 at 18:31, on Zulip):

right, more or less

nikomatsakis (Jan 14 2020 at 18:31, on Zulip):

anyway I'll poke at it some more

tmandry (Jan 14 2020 at 18:31, on Zulip):

sounds good

tmandry (Jan 14 2020 at 18:31, on Zulip):

not Send due to await retainment #67611

tmandry (Jan 14 2020 at 18:31, on Zulip):

@Matthew Jasper wrote down a great summary of the issues on this thread

tmandry (Jan 14 2020 at 18:32, on Zulip):

but I'm not sure if they're working on a fix, or were going to leave it at that

nikomatsakis (Jan 14 2020 at 18:33, on Zulip):

that's long :)

nikomatsakis (Jan 14 2020 at 18:34, on Zulip):

sounds like they're not sure what to do, but still theoretically working on it, looking for feedback

tmandry (Jan 14 2020 at 18:35, on Zulip):

ok, I'll re-read and see if I have any feedback to leave

tmandry (Jan 14 2020 at 18:35, on Zulip):

async fn presence affects an unrelated error message #66312

tmandry (Jan 14 2020 at 18:35, on Zulip):

so it sounds like this is the same issue as #67651, essentially

tmandry (Jan 14 2020 at 18:35, on Zulip):

which we already covered, moving on

tmandry (Jan 14 2020 at 18:35, on Zulip):

async/await: awaiting inside a match block captures borrow too eagerly #57017

nikomatsakis (Jan 14 2020 at 18:36, on Zulip):

we're kind of stuck here afaik on trying to decide the best design

nikomatsakis (Jan 14 2020 at 18:37, on Zulip):

ps I have to run I think because I have to get lunch and don't have many other chances to do it :)

tmandry (Jan 14 2020 at 18:37, on Zulip):

okay, yeah we are past the end of the meeting again :)

tmandry (Jan 14 2020 at 18:37, on Zulip):

that's the last Focus issue

tmandry (Jan 14 2020 at 18:38, on Zulip):

(which reminds me, we need to discuss the meeting time... we haven't been able to get through triage the last few meetings

tmandry (Jan 14 2020 at 18:38, on Zulip):

and there's more I want to discuss, like priorities for the next year)

tmandry (Jan 14 2020 at 18:39, on Zulip):

ok, well for anyone who's still around, maybe we can pick more things to work on?

tmandry (Jan 14 2020 at 18:39, on Zulip):

unless everyone already has enough

tmandry (Jan 14 2020 at 18:40, on Zulip):

OnDeck issues

tmandry (Jan 14 2020 at 18:40, on Zulip):

I would pick from these.. and there are a lot :)

Giles Cope (Jan 14 2020 at 18:41, on Zulip):

I think I've got a few things allocated - I'd better get them done before I chew more.

csmoe (Jan 14 2020 at 18:41, on Zulip):

@tmandry review request for this pr https://github.com/rust-lang/rust/pull/68212 , I'm not quite comfortable with the help message

tmandry (Jan 14 2020 at 18:41, on Zulip):

@csmoe ah yes I saw that

tmandry (Jan 14 2020 at 18:41, on Zulip):

I'll take a look, thanks!

tmandry (Jan 14 2020 at 18:42, on Zulip):

in the OnDeck list it looks like we have a couple ICEs, we should probably prioritize those next

tmandry (Jan 14 2020 at 18:42, on Zulip):

followed by diagnostics issues

tmandry (Jan 14 2020 at 18:43, on Zulip):

no one has requested more work though, so if it's needed we can do that.. asynchronously

Giles Cope (Jan 14 2020 at 18:44, on Zulip):

In my defense I've just switched to NixOs so some bedding in is going on :-)

tmandry (Jan 14 2020 at 18:44, on Zulip):

other notes.. take a look at the priorities for 2020 thread

csmoe (Jan 14 2020 at 18:44, on Zulip):

i'm going to work on https://github.com/rust-lang/rust/issues/64552 this week

tmandry (Jan 14 2020 at 18:46, on Zulip):

(that all sounds good, no point in assigning more work than will realistically get done)

tmandry (Jan 14 2020 at 18:46, on Zulip):

other notes.. take a look at the priorities for 2020 thread

I'm going to summarize these in a doc or some other form soon, hopefully

tmandry (Jan 14 2020 at 18:47, on Zulip):

but any comments are welcome

csmoe (Jan 14 2020 at 18:47, on Zulip):

but any comments are welcome

async book?

tmandry (Jan 14 2020 at 18:48, on Zulip):

async book?

I think I mentioned that in my first comment, somewhere under "Documentation"

tmandry (Jan 14 2020 at 18:48, on Zulip):

but agreed that it's important

Giles Cope (Jan 14 2020 at 18:48, on Zulip):

I wasn't quite sure what the relationship of the async book was to the rust book?

tmandry (Jan 14 2020 at 18:48, on Zulip):

I think we need a way to track non-code priorities like this, btw

tmandry (Jan 14 2020 at 18:49, on Zulip):

I wasn't quite sure what the relationship of the async book was to the rust book?

afaik, there's no plan to merge them

tmandry (Jan 14 2020 at 18:49, on Zulip):

but we might want to some day

Giles Cope (Jan 14 2020 at 18:49, on Zulip):

I've added a PR on the rust book to include the async/await keywords in the keyword list (but probably there should be a bit more of an update than this).

Giles Cope (Jan 14 2020 at 18:55, on Zulip):

I see there was already a pending one. How do we get this approved: https://github.com/rust-lang/book/pull/2140 ?

Giles Cope (Jan 14 2020 at 18:57, on Zulip):

I understand a comprehensive update would take a lot of effort, but the book is meant to be a living thing so we should at least update the keywords... it seems strange them not being there.

tmandry (Jan 14 2020 at 18:58, on Zulip):

yeah, it seems like there's a pretty big backlog of PRs there

tmandry (Jan 14 2020 at 19:00, on Zulip):

I'm not sure what the process is / should be, other than leaving a ping on the PR

Giles Cope (Jan 14 2020 at 19:02, on Zulip):

Maybe a ping from your good self might get things moving :-)

tmandry (Jan 14 2020 at 19:03, on Zulip):

sure, I can leave a ping

Matthew Jasper (Jan 14 2020 at 19:03, on Zulip):

but I'm not sure if they're working on a fix, or were going to leave it at that

I've not done any work since writing that summary.

Matthew Jasper (Jan 14 2020 at 19:03, on Zulip):

I'm happy to implement something once there's some agreement on what to do

tmandry (Jan 14 2020 at 19:41, on Zulip):

I left a couple comments

nikomatsakis (Jan 14 2020 at 19:53, on Zulip):

I'm going to summarize these in a doc or some other form soon, hopefully

I was debating whether to schedule some time to take a stab at that too, do you want to try to do a bit of "pair programming" on it together, @tmandry?

tmandry (Jan 14 2020 at 20:02, on Zulip):

I was debating whether to schedule some time to take a stab at that too, do you want to try to do a bit of "pair programming" on it together, tmandry?

would be happy to

Last update: Jul 02 2020 at 19:45UTC