Skip to content

test(compile): Clean up freshness tests - #17376

Merged
epage merged 6 commits into
rust-lang:masterfrom
epage:c
Aug 21, 2026
Merged

test(compile): Clean up freshness tests#17376
epage merged 6 commits into
rust-lang:masterfrom
epage:c

Conversation

@epage

@epage epage commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This is prep for the -Z flag instead enable a config field to control mtime vs checksum fingerprinting.

The freshness.rs tests were forked to freshness_checksum.rs, assuming we were going to exclusively go with checksum-only in the short term. I'm proposing in #14136 that we make this a proper config. This means we should clarify these tests and de-duplicate them.

There are also tests in freshness.rs that have not been carried over to freshness_checksum.rs.

There are also simple changes to reduce the diff size.

How to test and review this PR?

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 20, 2026
@rustbot

rustbot commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

r? @weihanglo

rustbot has assigned @weihanglo.
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: @epage, @weihanglo
  • @epage, @weihanglo expanded to epage, weihanglo

@@ -0,0 +1,1967 @@
//! Tests for fingerprinting (rebuild detection).

@weihanglo weihanglo Aug 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the recommended way to review this commit d5750b2?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Depends on how closely you want to look at it.

What I did is

  • diff checksum and mtime
  • diff general and a previous commit of mtime

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. I took a skim. Looks good.

Have just a teeny-tiny suggestion: Could we make it a bit clearer int the module level doc that this module is for "These check for context independent of mtime vs checksum"?

Something like

//! Tests for fingerprinting (rebuild detection).
//!
//! Tests here are content independent of general file change rebuild detection,
//! e.g., environment variable changes or `--features` flag changes.
//! For those, please add tests to both [`freshness_mtime`] and [`freshness_checksum`].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I went with a little different of text. Hope it works

Comment thread tests/testsuite/freshness.rs Outdated

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feel free to merge when the typo gets fixed.

View changes since this review

@epage
epage enabled auto-merge August 21, 2026 01:06
@epage
epage added this pull request to the merge queue Aug 21, 2026
Merged via the queue into rust-lang:master with commit 0792546 Aug 21, 2026
29 checks passed
@epage
epage deleted the c branch August 21, 2026 02:19
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2026
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Aug 22, 2026
Update cargo submodule

5 commits in 514c56dd7321eecbfdcf9b6479519cf4edfab906..e8cb624d5701824f46a2ec5873cfd59ee3d2f66c
2026-08-19 00:31:04 +0000 to 2026-08-22 00:23:45 +0000
- feat(config): Add build.fingerprint (rust-lang/cargo#17382)
- chore: bump to 0.101.0; update changelog (rust-lang/cargo#17379)
- Install cargo tools with locked dependencies (rust-lang/cargo#17377)
- test(compile): Clean up freshness tests (rust-lang/cargo#17376)
- Fix clippy warning (rust-lang/cargo#17378)

r? ghost
@rustbot rustbot added this to the 1.100.0 milestone Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants