Traits working group meeting minutes

Hello, world! :heart:

We’re trying to get this traits working group going full steam, and this thread is a place for us to note down the results from our meetings. Our meetings are typically held on Zulip and you can find them scheduled under the compiler-team meeting calendar. Come join us!

3 Likes

Triage meeting on 2019-02-24

Info

Zulip thread.

Summary

The goal of the meeting was to try and figure out, in somewhat more detail, how we want to organize the traits working group itself. We’ve been doing work on enumerating and triaging the set of things we hope to do, but in this meeting we were basically trying to come up with some concrete next steps.

Ultimately we identified the following next steps:

  • Schedule a meeting to dig into some of the lifetime problems around async-await. This is kind of an “intersecting” issue between async await and the traigs WG, but seems high priority. (nikomatsakis)
  • Explore the use cases for lazy normalization, trying to create a summary of exactly which test cases are causing problems and why, and what it might take to fix them (can it be done without a full chalk transition?). (nikomatsakis)
  • Explore the use cases for GATs, trying to find a set of specific examples from async-await and other contexts. It seems likely that we could do an initial impl of GATs in rustc without chalk, but would it be enough? (aturon, centril)
  • Schedule a meeting to dig into the chalk transition – what is current status and what are the possible future routes, what should we be exploring? (nikomatsakis, scalexm)
  • Get tests plus FCP around type Foo = impl Bar (centril)

In general, we’re trying to get a sense for what the initial set of active ‘subprojects’ will be (basically, the things that the WG is focusing on). Ideally, each of them will have a distinct “lead” (or, better, leads!) who is driving the effort (in collaboration with the rest of us).

A likely set of initial subprojects will contain:

  • some amount of hacking on rustc (GATs, lazy norm) in an effort to “relieve the pressure”
  • some amount of hacking on chalk itself and on chalk integration
  • some amount of work on defining the semantics of other features like specialization by lowering them to chalk predicates

but that is not certain. A key drive is both the set of people we have involved and also what seems to be highest priority in terms of unblocking other things within Rust.

2 Likes

Triage meeting on 2019-03-04

Info

Zulip thread.

Summary

We followed up on the goals from last time.

Lifetime problems around async-await

We discussed how we found a way to resolve the async fn complications by changing the async fn desugaring, and hence don’t need any deep trait action. We are still interested in trying to find a way to solve the “captures problem” for impl Trait, however, and alexreg and nikomatsakis may do some follow-up there.

Explore use cases for lazy normalization

Some investigation occurred. Current plan to continue documenting the way that the current normalization code plays out and to hold some sort of meeting to document that and walk through it. That meeting will hopefully happen this week and will be recorded.

Explorse use cases for GATs

Not a lot of progress here. (Yet!)

Once we do make progress, though, the logical next step is probably to try and model those use cases some in Chalk, as well as to investigate more deeply how rustc could be extended to handle the cases natively (without blocking on full chalk integration).

Dig into the chalk transition

We have a meeting scheduled for tomorrow with the RLS 2.0 folks, planning to talk about how the type checker is working in that context.

We are thinking that integrating Chalk first into the RLS 2.0 project may be a better idea than starting with rustc, particularly as it can help get RLS 2.0 to a “working product” faster, but also because we may be able to use that to pursue the idea of sharing more code between chalk + compiler than we could readily do with rustc. Specifically, we should be able to have:

  • a library to share the definition of types between chalk + RLS 2.0
  • shared code for lowering traits + impls into logical rules

We also talked about other possible work on chalk, in particular the idea of chalk-specific refactorings but also building a benchmarking harness for the chalk-engine crate.

Miscellaneous discussion

There are a few other things we talked about this week:

Plans for the coming week

We settled on the following plans for the coming week:

So plans for this week are:

  • Describe how normalization works today and hold a (recorded) call to try and explain it to others. Trace through some of the examples where lazy norm would be helpful. (nikomatsakis)
  • Explore the use cases for GATs (aturon, centril)
  • Discuss RLS 2.0 type checker and contemplate how to integrate chalk into it (nikomatsakis, scalexm)
  • Maybe discuss other chalk improvements? (e.g., benchmarking harness) (nikomatsakis)
  • Maybe discuss the “lifetime capture” problem in impl Trait? (nikomatsakis, alexreg)
3 Likes

Triage meeting on 2019-03-11

Info

Zulip thread

Help wanted!

  • nikomatsakis is looking for someone to help with investigating lazy normatlization. The task would be to experimentally modify rustc and is best suited to someone already vaguely familiar with the Rust query system etc. See below.

Summary

We followed up on the goals from last time.

Lazy normalization and const generics

Link

Last week, nikomatsakis did more investigation, taking notes in this dropbox paper document. In general, it's still not entirely clear if the "cycle" that gives rise to the need for lazy normalization is something we can easily circumvent. One thing is that the generics_of and other queries for "anonymous constants" currently use the incorrect parent def-id precisely to avoid a cycle, so it's hard to see how the cycle would manifest.

Next step: re-establish the cycle in those queries so it can be observed.

GATs

Link

centril + aturon drew up a paper document containing GAT use casts and there are some notes from the conversation in this Zulip thread.

Next step: unclear, but probably to investigate the use cases and make some comments.

Integrating into RLS 2.0

Link

We had a chat (with video) about how the RLS 2.0 type checker works. We decided we'd rather try to do the chalk integration into RLS 2.0 "correct", meaning that we can share a lot more code with chalk.

Next step: nikomatsakis to schedule some time to sketch out what chalk integration would look like.

Other chalk improvements

Maybe discuss other chalk improvements? (e.g., benchmarking harness) (nikomatsakis)

This didn't happen and we'll probably shelve it for now in favor of the previous point.

"lifetime capture"

Maybe discuss the "lifetime capture" problem in impl Trait?

This didn't happen and we'll probably shelve it for now in favor of the next point.

Draft RFCs

centril plans to (at minimum) upload some draft RFCs to a new wg-traits repository.

Associated type bounds

alexreg has been working on associated type bounds in this Zulip thread and will likely continue to do so.

Plans for the coming week

  • Try to correct the generics_of query etc for constants so we can observe what results.
    • Help wanted! nikomatsakis is looking for someone to help with investigating lazy normatlization. The task would be to experimentally modify rustc and is best suited to someone already vaguely familiar with the Rust query system etc.
  • Read-over GAT use cases and try to theorize about what it would take to support them in rustc etc (nikomatsakis)
  • Schedule a call to talk over what chalk integration into RLS 2.0 might look like (nikomatsakis)
  • Create a wg-traits repository to house draft RFCs and the like. (nikomatsakis)
  • Upload drafts of various traits-related RFCs to wg-traits (centril)
  • Continue work on associated type bounds (alexreg)
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.