Skip to content

Miri: give the incremental session a chance to finish - #160760

Open
RalfJung wants to merge 2 commits into
rust-lang:mainfrom
RalfJung:miri-incremental
Open

Miri: give the incremental session a chance to finish#160760
RalfJung wants to merge 2 commits into
rust-lang:mainfrom
RalfJung:miri-incremental

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member

View all comments

This helps with rust-lang/miri#5013. Reruns still aren't as fast as I'd like, but using nextest to run libcore tests shows a big difference:

before:
 Nextest run ID 56b7b355-6225-4083-96e3-aeeabbe80523 with nextest profile: default-miri
    Starting 10 tests across 2 binaries (2760 tests skipped)
        PASS [  31.264s] coretests::coretests any::any_downcast_mut
        PASS [  31.287s] coretests::coretests any::distinct_type_names
        PASS [  32.747s] coretests::coretests iter::traits::iterator::test_any
        PASS [  32.758s] coretests::coretests any::any_owning
        PASS [  32.864s] coretests::coretests any::dyn_type_name
        PASS [  32.973s] coretests::coretests any::any_downcast_ref
        PASS [  33.139s] coretests::coretests any::any_unsized
        PASS [  33.719s] coretests::coretests any::any_referenced
        PASS [  35.786s] coretests::coretests any::any_fixed_vec
        PASS [  38.951s] coretests::coretests num::dec2flt::parse::many_digits
────────────
     Summary [  38.955s] 10 tests run: 10 passed, 2760 skipped

after:
 Nextest run ID af603971-e41e-466d-8469-0425057fa325 with nextest profile: default-miri
    Starting 10 tests across 2 binaries (2761 tests skipped)
        PASS [  15.063s] coretests::coretests any::any_unsized
        PASS [  15.176s] coretests::coretests any::distinct_type_names
        PASS [  15.200s] coretests::coretests any::any_referenced
        PASS [  15.550s] coretests::coretests iter::traits::iterator::test_any
        PASS [  15.993s] coretests::coretests any::any_fixed_vec
        PASS [  17.506s] coretests::coretests num::dec2flt::parse::many_digits
        PASS [  17.902s] coretests::coretests any::any_downcast_ref
        PASS [  18.188s] coretests::coretests any::any_owning
        PASS [  19.270s] coretests::coretests any::dyn_type_name
        PASS [  19.702s] coretests::coretests any::any_downcast_mut
────────────
     Summary [  19.705s] 10 tests run: 10 passed, 2761 skipped

It still seems to spend at least 10s building the crate before Miri even begins running, no idea what it is doing in that time. But it's 15s less than before so that's good. :)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 8, 2026
@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 8, 2026
Miri: give the incremental session a chance to finish


try-job: dist-x86_64-linux
@RalfJung
RalfJung force-pushed the miri-incremental branch 3 times, most recently from 9e91369 to 271cccb Compare August 8, 2026 14:40
@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=dist-x86_64-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 8, 2026
Miri: give the incremental session a chance to finish


try-job: dist-x86_64-linux
@rust-log-analyzer

This comment has been minimized.

@RalfJung
RalfJung marked this pull request as ready for review August 8, 2026 15:38
@rustbot

rustbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2026
@rustbot

rustbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 19 candidates

@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

r? @bjorn3

@rustbot

rustbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Failed to set assignee to bjorn3: error sending request

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

Comment thread compiler/rustc_driver_impl/src/lib.rs Outdated
1: main
at tests/native-lib/pass/ptr_read_access.rs:LL:CC

warning: 1 warning emitted

@RalfJung RalfJung Aug 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kind of annoying that we get this output now... but warnings are rare in Miri so 🤷

View changes since the review

Comment thread compiler/rustc_driver_impl/Cargo.toml Outdated
@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=dist-x86_64-linux

@rust-bors

rust-bors Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 19c9e78 with merge 5b05222

(The previously running try build was automatically cancelled.)

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/31265178652

rust-bors Bot pushed a commit that referenced this pull request Aug 8, 2026
Miri: give the incremental session a chance to finish


try-job: dist-x86_64-linux
@bjorn3

bjorn3 commented Aug 8, 2026

Copy link
Copy Markdown
Member

Failed to set assignee to bjorn3: error sending request

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

Github api hickup I guess.

r? bjorn3

@rustbot rustbot assigned bjorn3 and unassigned nnethercote Aug 8, 2026
@rust-log-analyzer

This comment has been minimized.

@RalfJung
RalfJung force-pushed the miri-incremental branch 2 times, most recently from 75fd8df to f41d58c Compare August 8, 2026 17:08
@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@bors try cancel
I already tested this locally

@rust-bors

rust-bors Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

Okay this seems to work, thanks. :)
Miri now has its own codegen backend. That also let me remove this ad-hoc hook that you added to the dummy backend to make it work for Miri.

@rust-log-analyzer

This comment has been minimized.

Comment thread src/tools/miri/src/bin/miri.rs
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@RalfJung

RalfJung commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Looks to be finally ready :)

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants