Stream: wg-async-foundations

Topic: meeting 2019.07.02


nikomatsakis (Jul 02 2019 at 17:04, on Zulip):

Hey @WG-async-foundations -- meeting?

Florian Gilcher (Jul 02 2019 at 17:05, on Zulip):

I'm somewhat available (on a train), so forgive if I might be delayed from time to time.

nikomatsakis (Jul 02 2019 at 17:05, on Zulip):

Obviously the biggest announcement: we've opened a stabilization issue

centril (Jul 02 2019 at 17:06, on Zulip):

I made #62214 to for #![feature(async_closure)] to satisfy the blocking issue #62214 and then #62292 will do the actual feature gate split.

centril (Jul 02 2019 at 17:06, on Zulip):

We have #62236 to move some tests, which #62270 will fix.

centril (Jul 02 2019 at 17:06, on Zulip):

Also, #61922 just landed for some space optimizations.

nikomatsakis (Jul 02 2019 at 17:07, on Zulip):

I guess the question is: what bits of engineering work remain that are not considering blocking

centril (Jul 02 2019 at 17:07, on Zulip):

I also made #62293 to remove the await! macro; but I will split some things out from that PR solely for the purpose of test coverage.

nikomatsakis (Jul 02 2019 at 17:08, on Zulip):

er, sorry, I meant that are not represented well by issues

nikomatsakis (Jul 02 2019 at 17:08, on Zulip):

I guess let's review the issues that are not yet categorized

nikomatsakis (Jul 02 2019 at 17:08, on Zulip):

To start new issues without any code

nikomatsakis (Jul 02 2019 at 17:09, on Zulip):

Mutually recursive async fns are hard to make Send #62284

nikomatsakis (Jul 02 2019 at 17:09, on Zulip):

@Taylor Cramer I assume you don't consider this a blocker? This is presumably related to the trait system reporting a cycle?

nikomatsakis (Jul 02 2019 at 17:10, on Zulip):

I'm not sure what to think, seems pretty confusing

nikomatsakis (Jul 02 2019 at 17:11, on Zulip):

Move tests in src/test/run-pass/async-await -> src/test/ui/async-await #62236

nikomatsakis (Jul 02 2019 at 17:11, on Zulip):

has a PR already...

centril (Jul 02 2019 at 17:11, on Zulip):

Labeled as Deferred

centril (Jul 02 2019 at 17:12, on Zulip):

but I think it will land with no problem in any case

nikomatsakis (Jul 02 2019 at 17:12, on Zulip):

yes.

nikomatsakis (Jul 02 2019 at 17:12, on Zulip):

On the topic of test suite:

centril (Jul 02 2019 at 17:12, on Zulip):

@nikomatsakis ugh... https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a45fcd19dad3ab5a2b9880739e70dd95 gives me:

warning[E0381]: use of possibly uninitialized variable: `_`
  --> src/lib.rs:17:13
   |
17 |     let _ = foo().await;
   |             ^^^^^^^^^^^ use of possibly uninitialized value
   |
   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
   = note: for more information, try `rustc --explain E0729`
nikomatsakis (Jul 02 2019 at 17:13, on Zulip):

Er, sorry, moving on to blocking issue review

centril (Jul 02 2019 at 17:13, on Zulip):

(regarding #62284)

nikomatsakis (Jul 02 2019 at 17:13, on Zulip):

er, wait, ok, jumping back :)

nikomatsakis (Jul 02 2019 at 17:13, on Zulip):

we didn't really resolve #62284.

nikomatsakis (Jul 02 2019 at 17:14, on Zulip):

also, um, yeah, @centril .. what's up with that?

centril (Jul 02 2019 at 17:14, on Zulip):

beats me...

nikomatsakis (Jul 02 2019 at 17:15, on Zulip):

seems...worth filing an issue over

centril (Jul 02 2019 at 17:15, on Zulip):

on it

Taylor Cramer (Jul 02 2019 at 17:16, on Zulip):

yeah I hit that yesterday

Taylor Cramer (Jul 02 2019 at 17:16, on Zulip):

and actually still have an issue box open that I didn't hit submit on for it :)

nikomatsakis (Jul 02 2019 at 17:17, on Zulip):

I see though that the cycle error isn't quite what I expeted for #62284

nikomatsakis (Jul 02 2019 at 17:17, on Zulip):

it does seem to me like this is something one could hit...relatively easily?

Taylor Cramer (Jul 02 2019 at 17:17, on Zulip):

oh yeah

Taylor Cramer (Jul 02 2019 at 17:18, on Zulip):

you hit it constantly if you try and write recursive code

centril (Jul 02 2019 at 17:18, on Zulip):

@Taylor Cramer filed as https://github.com/rust-lang/rust/issues/62312

Taylor Cramer (Jul 02 2019 at 17:18, on Zulip):

I just try to advocate not doing that ;)

Taylor Cramer (Jul 02 2019 at 17:18, on Zulip):

but obviously that's not a good answer

nikomatsakis (Jul 02 2019 at 17:18, on Zulip):

do we consider that blocking then? seems like, per the standards we've been doing, that perhaps we ought to

nikomatsakis (Jul 02 2019 at 17:18, on Zulip):

we'll want to dedicate some time to understanding the problem

centril (Jul 02 2019 at 17:18, on Zulip):

I think so; at minimum the C-future-compat bit sounds ominous

centril (Jul 02 2019 at 17:19, on Zulip):

e.g. shipping a new soundness hole is a no-no for me

nikomatsakis (Jul 02 2019 at 17:19, on Zulip):

er, sorry, I was referring to #62284; but yes there is also #62312 to consider

nikomatsakis (Jul 02 2019 at 17:19, on Zulip):

I marked them both as blocking but I guess that means we need to dedicate some time to digging into them

nikomatsakis (Jul 02 2019 at 17:20, on Zulip):

in terms of our existing blocking issues ...

nikomatsakis (Jul 02 2019 at 17:20, on Zulip):

@Taylor Cramer tells me that

increase test coverage for async-await #62121

is proceeded relatively well

centril (Jul 02 2019 at 17:20, on Zulip):

sgtm;

@Taylor Cramer feel free to fill in #62312 if you have more details

nikomatsakis (Jul 02 2019 at 17:20, on Zulip):

I think that

type inference doesn't work in async fn that return Box<dyn SomeTrait> #60424

is somewhat "at risk"

nikomatsakis (Jul 02 2019 at 17:21, on Zulip):

that is, @davidtwco and I looked some into it, the thing I thought might fix it seemed to have led to complications, and afaik we didn't dig much further yet

nikomatsakis (Jul 02 2019 at 17:21, on Zulip):

async fn should support multiple lifetimes #56238

ought to land "real soon now"

centril (Jul 02 2019 at 17:21, on Zulip):

@nikomatsakis hopefully you have more time after #56238 lands

nikomatsakis (Jul 02 2019 at 17:21, on Zulip):

so basically the new issues (above) and #60424 are the major ones

centril (Jul 02 2019 at 17:21, on Zulip):

I can raise the prio of #56238

nikomatsakis (Jul 02 2019 at 17:22, on Zulip):

(yeah, I've got a fix for the ICE and I'm re-running tests with --bless now)

nikomatsakis (Jul 02 2019 at 17:22, on Zulip):

should we look at the uncategorized bugs real quick?

nikomatsakis (Jul 02 2019 at 17:22, on Zulip):

er, I mean the bugs labeled AsyncAwait-Unclear

nikomatsakis (Jul 02 2019 at 17:23, on Zulip):

Using associated types in async fn type break typing #60414

this came up on the stabilization issue

centril (Jul 02 2019 at 17:23, on Zulip):

@nikomatsakis hmm; did you forget to label https://github.com/rust-lang/rust/issues/62312 and https://github.com/rust-lang/rust/issues/62284 btw?

nikomatsakis (Jul 02 2019 at 17:24, on Zulip):

not sure what happened there

nikomatsakis (Jul 02 2019 at 17:24, on Zulip):

I thought I labeled them

centril (Jul 02 2019 at 17:24, on Zulip):

maybe github is taking "eventually" in "eventually consistent" a bit too far :P

nikomatsakis (Jul 02 2019 at 17:24, on Zulip):

oh, I didn't "click away" from the dialog box

nikomatsakis (Jul 02 2019 at 17:25, on Zulip):

Using associated types in async fn type break typing #60414

this came up on the stabilization issue

there is a pending fix for this that I have to review (I can do that today)

nikomatsakis (Jul 02 2019 at 17:25, on Zulip):

it looked fine when I glanced at it before

centril (Jul 02 2019 at 17:25, on Zulip):

Neat

nikomatsakis (Jul 02 2019 at 17:26, on Zulip):

I don't think there's much future compat risk here but it's prob a moot point whether we mark it as blocking or not

nikomatsakis (Jul 02 2019 at 17:26, on Zulip):

Inherent async fn returning Self treats type's lifetime parameters as 'static #61949

Taylor Cramer (Jul 02 2019 at 17:26, on Zulip):

that one's the same as https://github.com/rust-lang/rust/issues/53613

centril (Jul 02 2019 at 17:26, on Zulip):

Not sure I agree with that; when it is part of -> impl Trait surface syntax it is much more obscure, but it becomes more prominent in async fn

Taylor Cramer (Jul 02 2019 at 17:27, on Zulip):

sure, I'm saying the underlying compiler bug is the same

centril (Jul 02 2019 at 17:27, on Zulip):

(which makes fixing it later harder)

centril (Jul 02 2019 at 17:27, on Zulip):

@Taylor Cramer granted

nikomatsakis (Jul 02 2019 at 17:27, on Zulip):

yeah I forgot about that

nikomatsakis (Jul 02 2019 at 17:27, on Zulip):

hmm

Taylor Cramer (Jul 02 2019 at 17:28, on Zulip):

I agree it seems pretty bad-- there's a decently obvious future-compat hazard there

nikomatsakis (Jul 02 2019 at 17:28, on Zulip):

well, it .. I guess it is fixable via some ... hacky logic

Taylor Cramer (Jul 02 2019 at 17:28, on Zulip):

yeah but it's messy as heck

nikomatsakis (Jul 02 2019 at 17:28, on Zulip):

yes

centril (Jul 02 2019 at 17:28, on Zulip):

I'd be fine with e.g. a temporary hack to make it an error and preserve future compat

nikomatsakis (Jul 02 2019 at 17:28, on Zulip):

the hacky logic is basically tracking the lifetimes that appear in Self

centril (Jul 02 2019 at 17:28, on Zulip):

but that temporary hack might be as involved as the fix... idk

nikomatsakis (Jul 02 2019 at 17:28, on Zulip):

and when we visit the Self type

Taylor Cramer (Jul 02 2019 at 17:28, on Zulip):

you mean making it an error to return Self from async fn or -> impl Trait?

nikomatsakis (Jul 02 2019 at 17:28, on Zulip):

we visit that list

centril (Jul 02 2019 at 17:29, on Zulip):

@Taylor Cramer we could do that yeah

nikomatsakis (Jul 02 2019 at 17:29, on Zulip):

prohibiting Self is the other option, but it feels...idk.

Taylor Cramer (Jul 02 2019 at 17:29, on Zulip):

it feels pretty bad

nikomatsakis (Jul 02 2019 at 17:29, on Zulip):

it feels ungreat, yes :)

nikomatsakis (Jul 02 2019 at 17:29, on Zulip):

I think the "track lifetimes in lowering" doesn't seem that complicated..?

nikomatsakis (Jul 02 2019 at 17:29, on Zulip):

though yeah it just feels like "egads we are clearly doing something wrong"

centril (Jul 02 2019 at 17:29, on Zulip):

Banning Self feels like a fairly syntactic measure that is at least easy to have confidence in

centril (Jul 02 2019 at 17:30, on Zulip):

e.g. you can do it in ast_validation

nikomatsakis (Jul 02 2019 at 17:30, on Zulip):

well I gotta run to a meeting but the question is: blocker or not? seems like yes

centril (Jul 02 2019 at 17:30, on Zulip):

Yes imo

nikomatsakis (Jul 02 2019 at 17:30, on Zulip):

for those purposes, banning self is an "ok" fix, I agree

nikomatsakis (Jul 02 2019 at 17:31, on Zulip):

I'm also ok with trying to do the "proper" fix

centril (Jul 02 2019 at 17:31, on Zulip):

(And I'm personally fine with a special feature gate... we did similar things with const fn... some folks complained, but most were happy we shipped const fn as a result)

centril (Jul 02 2019 at 17:31, on Zulip):

For sure, the proper fix is well... more proper :P

Taylor Cramer (Jul 02 2019 at 17:31, on Zulip):

Yeah I have no opinion on this-- it seems like we want to fix it at some point obv., and I can't think of a non-hacky way to do that

nikomatsakis (Jul 02 2019 at 17:32, on Zulip):

right

nikomatsakis (Jul 02 2019 at 17:32, on Zulip):

not without a bigger refactoring

centril (Jul 02 2019 at 17:32, on Zulip):

@Taylor Cramer well banning Self in ast_validation with a visitor seems easy enough?

Taylor Cramer (Jul 02 2019 at 17:35, on Zulip):

@centril sure, that's super easy.

Taylor Cramer (Jul 02 2019 at 17:35, on Zulip):

but obv. it would also be a breaking change if we did it for -> impl Trait as well

Taylor Cramer (Jul 02 2019 at 17:35, on Zulip):

so that's kind of unfortunate

centril (Jul 02 2019 at 17:35, on Zulip):

Oh; I just mean for async fn

centril (Jul 02 2019 at 17:36, on Zulip):

it's in the AST so lowering to impl Trait hasn't happened yet

Taylor Cramer (Jul 02 2019 at 17:37, on Zulip):

@centril oh sure, I meant if we wanted to try and fix it in impl Trait then we'd be avoiding the backcompat hazard that exists there already

centril (Jul 02 2019 at 17:37, on Zulip):

sure, my view is basically that the proper fix would be nicest of all but I'll settle for a big hammer just for async fn if need be :P

centril (Jul 02 2019 at 17:38, on Zulip):

(Or maybe "large fishing net" is the more appropriate analogy :D )

centril (Jul 02 2019 at 17:39, on Zulip):

@Taylor Cramer btw, did you see my note to you on Discord re. #62292? (i.e. feel free to r? that)

Taylor Cramer (Jul 02 2019 at 17:46, on Zulip):

@centril yeah i did, thanks

Last update: Nov 18 2019 at 02:10UTC