Skip to content

Conversation

@weihanglo
Copy link
Member

Beta backports

In order to make CI pass, the following PRs are also cherry-picked:

See rust-lang/cargo 16104 for what we're testing against
This mtime shift for .rmeta is a workaround as rustc incremental build
since rust-lang/rust 114669 (1.90.0) skips unnecessary rmeta generation.

The situation is like this:

1. When build script execution's external dependendies
   (rerun-if-changed, rerun-if-env-changed) got updated,
   the execution unit reran and got a newer mtime.
2. rustc type-checked the associated crate, though with incremental
   compilation, no rmeta regeneration. Its `.rmeta` stays old.
3. Run `cargo check` again. Cargo found build script execution had
   a new mtime than existing crate rmeta, so re-checking the crate.
   However the check is a no-op (input has no change), so stuck.
@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 18, 2025

r? @ehuss

rustbot has assigned @ehuss.
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
Copy link
Collaborator

rustbot commented Nov 18, 2025

⚠️ Warning ⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against rust-1.92.0. Please double check that you specified the right target!

@ehuss
Copy link
Contributor

ehuss commented Nov 18, 2025

Has this gotten any testing on nightly, yet?

I'm a little nervous about unexpected problems like #6573 (touching the mtime on every crate caused a massive regression in Docker). This doesn't look like it will hit that particular case (since it seems to only be modifying the mtime on build), but it's hard to predict what consequences this might have. In particular, modifying the mtime with set_file_time_no_err sometimes does not have the same behavior as actually modifying the file.

(For the record, I think this is something that should be fixed in rustc instead. This is fine to do here, but I hope it is temporary.)

@weihanglo
Copy link
Member Author

It is fairly new so data is insufficient. If there is a concern, we should cancel this backport. Backport should not be risky.

@epage
Copy link
Contributor

epage commented Nov 18, 2025

A less risky backport would be to disable incremental compilation

@weihanglo
Copy link
Member Author

@weihanglo weihanglo added S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2025
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 S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants