owned this note changed 2 years ago
Published Linked with GitHub

Welcome, last meetup review

Review from last year

In the last meetup we talked about these plans

Next summer:

  • A WIP new trait solver (testable)
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • MIR Formality is testable against Rust test suite
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • Features:
    • TAIT
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
    • RPITIT
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →

EOY 2023: New foundations designed and in initial use

  • New trait solver replaces evaluate, but not used everywhere
  • Onboarding plan and documentation for new trait solver
  • MIR Formality integrated into language design process

EOY 2024: New foundations shipped and shared

  • New trait solver shared by rustc and rust-analyzer
    • milestone: type-ir used by rustc/rust-analyzer
  • Clean API for extensible trait errors / visualization
    • at least available internally
  • Shiny new features:
    • Polonius
    • GAT implied bounds
    • impl trait every-dang-where
  • Edition boundary things
    • Trait changes e.g. opt-in dyn-ness
    • Inference changes
      • make Into stop inferring?
      • early-late interactions?

What have we done since the last meetup.

  • More progress on polonius than expected

What worked really well and what worked less well?

A review of the trait solver planning

This may make more sense as part of the solver deep dive later today?

The lazy norm discussion looks like it was on point, though it may have underestimated just how frequently we rely on types being normalized. Use it in new solver, still seems like "the correct choice"?

we talked about the invariants of the solver, quite a few of these don't actually hold: rustc-dev-guide.

We planned the solver rewrite on Day 2. This is mostly up-to-date, with some differences:

Resources

Notes, minutes from the meeting itself

Next summer:

  • A WIP new trait solver (testable)
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • MIR Formality is testable against Rust test suite
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
  • Features:
    • TAIT
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →
    • RPITIT
      Image Not Showing Possible Reasons
      • The image file may be corrupted
      • The server hosting the image is unavailable
      • The image path is incorrect
      • The image format is not supported
      Learn More →

Overall goal for EOY 2023 were:

  • New trait solver replaces evaluate, but not used everywhere
    • Discussion about whether we truly want to use the new trait solver to replace evaluate (but not fulfill). Or do we want to use it just in one place? We might have meant using it for internal evaluate queries.
    • Regardless we are now thinking of different strategies for incremental adoption, especially starting with coherence. MIR validation is another place, which has a lot of bugs when it comes to TAITs.
  • Onboarding plan and documentation for new trait solver
    • didn't really do anything on this, but we do have documentation for the new trait solver
    • the documentation is a bit cyclic
    • we did grow as a team in terms of new members
  • MIR Formality integrated into language design process
    • used it more in discussions, but really fairly stalled out

Overall, somewhat on track to meet. Formality has made slow progress and TAITs encountered some surprises, but we are understand the challenges better.

Polonius has been making progress. Niko's version, we "rewrote" in polonius style. lqd sees it as "we changed the minimal amount". Niko thinks that this just shows that the new style is not so different from the old one. Also, we now see a path to a scalable version of the new analysis. Goal is to land "naive and slow" version of the sensitive analysis by end of year.

PR that reimplements borrow checker in the polonius style is up and under review, expected to land soon. Took a while to integrate refactorings from cjgillot plus liveness changes. Now good to go. Perf test was done, but it's still protected by a feature flag. Only the liveness changes change existing code paths. Perf tests with flag disabled (no change), with flag enabled, it's a bit slower than we would like, but it also does a bit of extra work.

2024 EOY goals didn't age so well, but we'll revisit.

What worked really well and less well. Did we spend our time well, is there stuff we should do less of? Walking through the features was generally useful. Knowing what RFCs are accepted, whether or not we are working on them, was useful. That is probably something we should review as we discuss the roadmap.

We discussed possibility of getting foundation to hire program manager.

Pseudocode? Maybe, depends where we'll want it. For most of the algorithms (e.g., overflow, candidate assembly), initial version came out of the meeting, but then we encountered problems. Was useful because back then we didn't know where to start.

Select a repo