Skip to content

feat(config): Add build.fingerprint - #17382

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
epage:checksum
Aug 22, 2026
Merged

weihanglo merged 2 commits into
rust-lang:masterfrom
epage:checksum

Conversation

@epage

@epage epage commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This is part of #14136

This changes -Zchecksum-freshness from turning on checksum freshness to enabling build.fingerprint.

For .cargo/config.toml:

[unstable]
checksum-freshness = true

[build]
fingerprint = "content"

How to test and review this PR?

@rustbot rustbot added the A-build-execution Area: anything dealing with executing the compiler label Aug 21, 2026
@rustbot

rustbot commented Aug 21, 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

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-rebuild-detection Area: rebuild detection and fingerprinting Command-report S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2026

@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.

Let me know if you have any idea, or otherwise I'll merge in a few hours later.

View changes since this review

Comment thread doc/book/src/reference/unstable.md Outdated

Select the method used for detecting when a build should occur based on source input changes.

* `mtime`: Last modified time of the input

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.

IIRC we slightly floated an idea during the meeting, but couldn't find the note. Should we say "auto" or else, so we don't not lock ourselves in mtime? As we don't think mtime is the right direct and may want to change that in the future.

Though anyway this is not a merge blocker

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.

From what I remember, we were starting with standard mtime and checksum and then can always expand out to include a hybrid mode in the future, to keep this narrowly focused for getting stabilized. We can always change the default, deprecate values, etc.

@weihanglo
weihanglo enabled auto-merge August 22, 2026 00:00
@weihanglo
weihanglo added this pull request to the merge queue Aug 22, 2026
Merged via the queue into rust-lang:master with commit e8cb624 Aug 22, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2026
@epage
epage deleted the checksum branch August 22, 2026 01:21
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
pull Bot pushed a commit to linyihai/cargo that referenced this pull request Aug 23, 2026
### What does this PR try to resolve?

Establishing a pattern of their use which should reduce needing review
feedback like
rust-lang#17382 (comment)

See https://rust-lang.github.io/mdBook/format/markdown.html#admonitions

### How to test and review this PR?
pull Bot pushed a commit to TKaxv-7S/cargo that referenced this pull request Sep 7, 2026
### What does this PR try to resolve?

I was reading the fingerprint logic docs (yet again) and noticed that
the doc comment didn't seems to match the code.
Seem this doc comment got left behind in
rust-lang#17382.

Went ahead and updated to match the updated implementation.

### How to test and review this PR?

just a comment

r? @epage
ved-merget pushed a commit to Pufferfish-Merget/bench-cargo that referenced this pull request Sep 15, 2026
### What does this PR try to resolve?

Establishing a pattern of their use which should reduce needing review
feedback like
rust-lang/cargo#17382 (comment)

See https://rust-lang.github.io/mdBook/format/markdown.html#admonitions

### How to test and review this PR?
ved-merget pushed a commit to Pufferfish-Merget/bench-cargo that referenced this pull request Sep 15, 2026
### What does this PR try to resolve?

I was reading the fingerprint logic docs (yet again) and noticed that
the doc comment didn't seems to match the code.
Seem this doc comment got left behind in
rust-lang/cargo#17382.

Went ahead and updated to match the updated implementation.

### How to test and review this PR?

just a comment

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

Labels

A-build-execution Area: anything dealing with executing the compiler A-documenting-cargo-itself Area: Cargo's documentation A-rebuild-detection Area: rebuild detection and fingerprinting Command-report

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants