test(compile): Clean up freshness tests - #17376
Conversation
These check for context independent of mtime vs checksum
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| @@ -0,0 +1,1967 @@ | |||
| //! Tests for fingerprinting (rebuild detection). | |||
There was a problem hiding this comment.
What is the recommended way to review this commit d5750b2?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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`].
There was a problem hiding this comment.
I went with a little different of text. Hope it works
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
What does this PR try to resolve?
This is prep for the
-Zflag instead enable a config field to control mtime vs checksum fingerprinting.The
freshness.rstests were forked tofreshness_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.rsthat have not been carried over tofreshness_checksum.rs.There are also simple changes to reduce the diff size.
How to test and review this PR?