Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unstable support for outputting file checksums for use in cargo #126930

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Xaeroxe
Copy link
Contributor

@Xaeroxe Xaeroxe commented Jun 25, 2024

Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that cargo can read and use these values as an alternative to file mtimes.

This PR powers the changes made in this cargo PR rust-lang/cargo#14137

Here's the tracking issue for the cargo feature rust-lang/cargo#14136.

@rustbot
Copy link
Collaborator

rustbot commented Jun 25, 2024

r? @fmease

rustbot has assigned @fmease.
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

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. labels Jun 25, 2024
@Urgau
Copy link
Member

Urgau commented Jun 25, 2024

Given that this PR adds a new concept and a new flag it requires a minimum of discussion within the team.
Could you start a T-compiler Major Change Proposol following the guide.

@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2024

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.

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 1, 2024

This now has an MCP rust-lang/compiler-team#765

@fmease
Copy link
Member

fmease commented Jul 7, 2024

Waiting for rust-lang/compiler-team#765 FCP to complete. That is 2024-07-11 07:23h UTC.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2024
@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 13, 2024

The MCP has been accepted

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Jul 13, 2024
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 13, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2024

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 13, 2024

Correct, blake3 has been added as it was mentioned during the MCP review as being desirable.

@bors

This comment was marked as outdated.

@Urgau
Copy link
Member

Urgau commented Jul 17, 2024

We had some LLVM BOLT issues with the blake3 crate in #127754, a couple of days ago, on a simple try build.
Let's try this PR, to see if is also has those compilation issues.

@bors try (@Xaeroxe could you fix the conflicts please)

@bors

This comment was marked as outdated.

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 17, 2024

@Urgau conflicts resolved.

@Urgau
Copy link
Member

Urgau commented Jul 17, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 17, 2024
@bors
Copy link
Contributor

bors commented Jul 17, 2024

⌛ Trying commit d80d73e with merge c5ac80a...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2024
Add unstable support for outputting file checksums for use in cargo

Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that `cargo` can read and use these values as an alternative to file mtimes.

This PR powers the changes made in this cargo PR rust-lang/cargo#14137

Here's the tracking issue for the cargo feature rust-lang/cargo#14136.
@bors
Copy link
Contributor

bors commented Jul 17, 2024

☀️ Try build successful - checks-actions
Build commit: c5ac80a (c5ac80a53be9c08bed91b91be19981d3bf07821c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c5ac80a): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [0.3%, 2.3%] 2
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.5%, -0.5%] 1

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 768.642s -> 770.102s (0.19%)
Artifact size: 328.71 MiB -> 328.75 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 17, 2024
@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 26, 2024

Merge conflicts resolved, this is ready for review.

@bors
Copy link
Contributor

bors commented Jul 29, 2024

☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts.

@Xaeroxe
Copy link
Contributor Author

Xaeroxe commented Jul 29, 2024

Merge conflicts resolved.

@bors
Copy link
Contributor

bors commented Aug 4, 2024

☔ The latest upstream changes (presumably #128534) made this pull request unmergeable. Please resolve the merge conflicts.

@workingjubilee
Copy link
Member

hm.

r? compiler

@lcnr
Copy link
Contributor

lcnr commented Sep 12, 2024

r? compiler

@rustbot rustbot assigned chenyukang and unassigned lcnr Sep 12, 2024
}

impl SourceFileHashAlgorithm {
pub fn supported_in_cargo(&self) -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

This feels like inverting the dependency relationship. The Cargo team and the compiler team can agree on a set of algorithms, though in compiler code we don't need to mention what is supported in Cargo. Cargo can choose whatever algorithm it uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.