Skip to content

add Cargo.lock to CI-rustc allowed list for non-CI env #142232

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jun 9, 2025

Changes to dependencies usually require modifying Cargo.toml, which would already invalidate the CI-rustc cache if done in non-allowed paths. On non-CI environment, it should be safe to add Cargo.lock to the list of allowed paths as there is no real risk aside from a very rare false positive in cases like minor bumps to non-allowed path dependencies without modifying the Cargo.toml files.

Fixes #141986

@rustbot
Copy link
Collaborator

rustbot commented Jun 9, 2025

r? @Kobzol

rustbot has assigned @Kobzol.
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 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) labels Jun 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 9, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@Kobzol
Copy link
Contributor

Kobzol commented Jun 9, 2025

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 9, 2025

📌 Commit c3de813 has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 9, 2025
bors added a commit that referenced this pull request Jun 9, 2025
Rollup of 7 pull requests

Successful merges:

 - #129121 (Stabilize `tcp_quickack`)
 - #142192 (De-duplicate f16 & f128 doctest attributes)
 - #142193 (add tests for pattern binding drop order edge cases)
 - #142222 (Dont make `ObligationCtxt`s with diagnostics unnecessarily)
 - #142228 (rustc-dev-guide subtree update)
 - #142231 (Run `calculate_matrix` job on `master` to cache citool builds)
 - #142232 (add `Cargo.lock` to CI-rustc allowed list for non-CI env)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8daa8ef into rust-lang:master Jun 9, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jun 9, 2025
Rollup merge of #142232 - onur-ozkan:141986, r=Kobzol

add `Cargo.lock` to CI-rustc allowed list for non-CI env

Changes to dependencies usually require modifying `Cargo.toml`, which would already invalidate the CI-rustc cache if done in non-allowed paths. On non-CI environment, it should be safe to add `Cargo.lock` to the list of allowed paths as there is no real risk aside from a very rare false positive in cases like minor bumps to non-allowed path dependencies without modifying the `Cargo.toml` files.

Fixes #141986
@rustbot rustbot added this to the 1.89.0 milestone Jun 9, 2025
@onur-ozkan onur-ozkan deleted the 141986 branch June 9, 2025 17:11
@RalfJung
Copy link
Member

Just for awareness of anyone reading along here, it took not even 3 days for someone to hit this "very rare false positive" (#142338). I thought we had discussed this before in #131658? It is not acceptable to have any false positives in this logic. We don't accept very rare false answers by the borrow checker, and we need to apply the same standard here.

bors added a commit that referenced this pull request Jun 11, 2025
Revert "add `Cargo.lock` to CI-rustc allowed list for non-CI env"

This reverts commit c3de813 (#142232).

r? `@RalfJung`

Fixes: #142338
Unfixes: #141986
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jun 12, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#129121 (Stabilize `tcp_quickack`)
 - rust-lang/rust#142192 (De-duplicate f16 & f128 doctest attributes)
 - rust-lang/rust#142193 (add tests for pattern binding drop order edge cases)
 - rust-lang/rust#142222 (Dont make `ObligationCtxt`s with diagnostics unnecessarily)
 - rust-lang/rust#142228 (rustc-dev-guide subtree update)
 - rust-lang/rust#142231 (Run `calculate_matrix` job on `master` to cache citool builds)
 - rust-lang/rust#142232 (add `Cargo.lock` to CI-rustc allowed list for non-CI env)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootstrap: Build using download-rustc can modify Cargo.lock for non compiler/ deps, causing rustc to not be downloaded on next build
5 participants