Update cargo submodule#150739
Conversation
|
Some changes occurred in src/tools/cargo cc @ehuss |
|
This comment has been minimized.
This comment has been minimized.
fa879ed to
63dd6a8
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
63dd6a8 to
69f8120
Compare
|
@bors r+ rollup=never p=1 |
|
🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. |
This comment has been minimized.
This comment has been minimized.
Update cargo submodule 19 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..623444427f04292f3a3c7eac560cfa65ba0bb88e 2025-12-26 19:39:15 +0000 to 2026-01-06 21:05:05 +0000 - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439) r? ghost
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 709282b failed: CI. Failed jobs:
|
|
@ranger-ross It looks like rust-lang/cargo#16436 is causing some test failures. Can you take a look? |
|
Sorry for the trouble here. I was able to reproduced with following on cargo new foo
cd foo
cargo add cortex-m-semihosting
cargo buildLooking the the issue it seems to be an issue with the version comparison added here d.version_req().matches(unit.pkg.version())Printing the versions: So the resolved version is less than 0.5.8 required by the To unblock this I can open a PR to revert this change for now? (Unless the y'all see an obvious fix that I am missing) |
|
@ranger-ross this might be the fix you were looking for: diff --git a/src/cargo/core/compiler/custom_build.rs b/src/cargo/core/compiler/custom_build.rs
index 851b51018..16a2f4888 100644
--- a/src/cargo/core/compiler/custom_build.rs
+++ b/src/cargo/core/compiler/custom_build.rs
@@ -467,7 +467,7 @@ fn build_work(build_runner: &mut BuildRunner<'_, '_>, unit: &Unit) -> CargoResul
let Some(dependency) = unit.pkg.dependencies().iter().find(|d| {
d.package_name() == dep.unit.pkg.name()
&& d.source_id() == dep.unit.pkg.package_id().source_id()
- && d.version_req().matches(unit.pkg.version())
+ && d.version_req().matches(dep.unit.pkg.version())
}) else {
panic!(
"Dependency `{}` not found in `{}`s dependencies", |
|
yikes... yeah this likely the problem. Good catch! I'll open a PR with this change. |
|
raised rust-lang/cargo#16486 |
…lection (#16486) ### What does this PR try to resolve? Fixes a bug in the logic during (unit) dependency selection for build scripts introduced in #16436 This was discovered while updating the submodule in rust-lang/rust rust-lang/rust#150739 ### How to test and review this PR? ```sh cargo new foo cd foo cargo add cortex-m-semihosting cargo build ``` I plan to add test case for this in a follow up PR, but raising the fix PR to unblock the submodule update for now. r? @weihanglo
69f8120 to
d833c5c
Compare
|
@bors r+ rollup=never p=1 |
I don't know if this is true rust/library/panic_unwind/Cargo.toml Line 16 in 31cd367 Lines 92 to 94 in 31cd367 |
|
ohhhhh, geez sorry 😅 |
#16489) ### What does this PR try to resolve? This PR fixes a regression found in rust-lang/rust#150739 that was introduced in #16436. For `-Zbuild-std` std dependencies, we would panic due to the dependency not being present in `Cargo.toml`. ~~This PR adds handling fallback to the `unit.pkg.name()` if the unit both not present in `Cargo.toml` and `is_std`.~~ (see #16489 (comment)) This PR ensures that metadata propagation is only allowed between `std->std` crates and `non-std->non-std` crates. ### How to test and review this PR? ``` cargo new foo cd foo cargo add cortex-m cargo -Zbuild-std build ``` Previously we panic with ``` thread 'main' (4072127) panicked at src/cargo/core/compiler/custom_build.rs:472:21: Dependency `compiler_builtins` not found in `foo`s dependencies note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` with this change we not compile successfully r? @weihanglo
d833c5c to
a97825c
Compare
|
@bors r+ rollup=never p=1 |
|
🔒 Merge conflict This pull request and the base branch diverged in a way that cannot How do I rebase?Assuming
You may also read Please avoid the "Resolve conflicts" button on GitHub. Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how |
|
There should be no merge conflicts. Not sure what happened. cc @jieyouxu if you know something |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 1b39278 (parent) -> a3f2d5a (this PR) Test differencesShow 22 test diffsStage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard a3f2d5abe45a9acfaccbf09266b33e1fd7ab193e --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (a3f2d5a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 473.995s -> 473.694s (-0.06%) |
|
|
Sorry, forgot to post here. That was an issue with bors running concurrently. |
Update cargo submodule 5 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..6d1bd93c47f059ec1344cb31e68a2fb284cbc6b1 2026-01-09 03:50:15 +0000 to 2026-01-10 12:53:59 +0000 - fix: preserve `dep_name` for build script metadata (rust-lang/cargo#16494) - refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492) - Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490) - Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491) - fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455) --- An extra submodule update right after <#150739> due to a relatively impactful nightly regression <rust-lang/cargo#16493>
Update cargo submodule 5 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..6d1bd93c47f059ec1344cb31e68a2fb284cbc6b1 2026-01-09 03:50:15 +0000 to 2026-01-10 12:53:59 +0000 - fix: preserve `dep_name` for build script metadata (rust-lang/cargo#16494) - refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492) - Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490) - Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491) - fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455) --- An extra submodule update right after <#150739> due to a relatively impactful nightly regression <rust-lang/cargo#16493>
Update cargo submodule 5 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..6d1bd93c47f059ec1344cb31e68a2fb284cbc6b1 2026-01-09 03:50:15 +0000 to 2026-01-10 12:53:59 +0000 - fix: preserve `dep_name` for build script metadata (rust-lang/cargo#16494) - refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492) - Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490) - Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491) - fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455) --- An extra submodule update right after <rust-lang/rust#150739> due to a relatively impactful nightly regression <rust-lang/cargo#16493>
Update cargo submodule 5 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..6d1bd93c47f059ec1344cb31e68a2fb284cbc6b1 2026-01-09 03:50:15 +0000 to 2026-01-10 12:53:59 +0000 - fix: preserve `dep_name` for build script metadata (rust-lang/cargo#16494) - refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492) - Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490) - Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491) - fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455) --- An extra submodule update right after <rust-lang/rust#150739> due to a relatively impactful nightly regression <rust-lang/cargo#16493>
27 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..8c133afcd5e0d69932fe11f5907683723f8d361d
2025-12-26 19:39:15 +0000 to 2026-01-09 03:50:15 +0000
Manifest(feat: in-memory onlyManifestcargo#16409)--timings=<FMT>optional format values (fix(timing)!: remove--timings=<FMT>optional format values cargo#16420)-Zbuild-analysis(docs(unstable): expand docs for-Zbuild-analysiscargo#16476)-Zunstable-optionswith custom targets (test: add-Zunstable-optionswith custom targets cargo#16467)dependenciesfield toUnitRegistered(fix(log): adddependenciesfield toUnitRegisteredcargo#16448)build-dir(Implement fine grain locking forbuild-dircargo#16155)cargo report sessions(feat(report): new commandcargo report sessionscargo#16428)cargo report timings(feat(report): support --manifest-path incargo report timingscargo#16441)