Skip to content

Enable -Znext-solver on nightly by default for testing #1014

Description

@lcnr

Proposal

The next-generation trait solver is getting close to stabilization. When we stabilized its use in coherence checking, we had to revert the stabilization as it surfaced new issues we didn't detect via the crater run:

This is deeply unpleasant. It would be a lot worse when stabilizing full -Znext-solver as updating our UI test suite will be an incredibly large diff. We currently have more than 700 UI tests for the new solver and changing trait solvers impacts a lot of diagnostics, so blessing affected tests is a pain.

It's also just useful for the Types Team to get additional confidence when stabilizing the solver that its design doesn't have unknown issues. For this, we would like to enable the new trait solver on nightly for a while purely for testing purposes. This feels slightly non-trivial to me.

Doing so should not require us to modify our UI tests. CI and local development should still use the old solver by default, only the nightly release build should enable -Znext-solver by default.

Given that the old solver will still be used on beta and stable, having worse test coverage for it on nightly makes it easier to introduce regressions. Because of this, we intend to block non-trivial changes to the old solver while the new one is enabled by default.

After finishing the behavior changes of our normalization rework rust-lang/rust#155345 we've now started another crater run and I'd like to actually enable the new solver by default during the next month. I intend to do this after an announcement blogpost and a call for testing. See the discussion on zulip :>

Mentors or Reviewers

If you have a reviewer or mentor in mind for this work, mention them here. You can put your own name here if you are planning to mentor the work.

Process

The main points of the [Major Change Process]MCP are as follows:

  • File an issue describing the proposal.
  • A compiler team member who is knowledgeable in the area can second by writing @rustbot second or kickoff a team FCP with @rfcbot fcp $RESOLUTION.
  • Once an MCP is seconded, the Final Comment Period begins.
    • Final Comment Period lasts for 10 days after all outstanding concerns are solved.
    • Outstanding concerns will block the Final Comment Period from finishing. Once all concerns are resolved, the 10 day countdown is restarted.
    • If no concerns are raised after 10 days since the resolution of the last outstanding concern, the MCP is considered approved.

You can read [more about Major Change Proposals on forge]MCP.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions