Repository navigation
Accept either unseen repository in the vendored Cargo real-Bazel flow - #2227
Conversation
…gnore line `cargo::vendored_from_cargo_with_config` comments out the line the scan wrote in `.bazelignore` and expects `bazel cquery //...` and `bazel query 'deps(//...)'` to fail on a repository that the main repository does not see. It looked for the hub's repository (`@crates__...`) alone. The build file that cargo-bazel writes into the committed copy names `@platforms` as well, and Bazel reports the first one it meets: on a Linux runner with Bazel 9.3.2 the query named `@platforms` and the flow failed on its own check. The flow now takes either name for that failure. Test only: nothing the command does changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The check of the commands that fail once the ignore line is commented out now reads the name out of Bazel's message and takes it only when the message is about the main repository's view: `platforms`, or a repository of the crate hub. The same words about another repository's view, or about another name, are a different failure and no longer pass for the expected one. A test without Bazel holds the check to the two messages that were seen and to three it must not take. The module docs, the comment at the call and the section on the build file in a vendored crate said the commands end on the dependency's repository alone. They now name `platforms` as well, which is what a user who comments the line out can see. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
PR SummaryLow Risk Overview The e2e helper now parses the from main repository message and treats failure as valid only when the unseen name is No socket-patch command behavior changes—only the test assertion and documentation. Reviewed by Cursor Bugbot for commit 17352ac. Configure here. |
|
[agent] PR shepherd: review brief for the approver What it does Risk Look here
Verified
Changes I made Open questions Generated by Claude Code |
Wenxin Jiang (Wenxin-Jiang)
left a comment
There was a problem hiding this comment.
[agent] Reviewed; no major findings.
A real-Bazel test of vendored Cargo no longer fails when Bazel names
@platformsbefore the crate hub's repository.Why
cargo::vendored_from_cargo_with_configcomments out the line that the scan wrote in.bazelignoreand expectsbazel cquery //...andbazel query 'deps(//...)'to fail on a repository that the main repository does not see. Its helper looked for the hub's repository (@crates__...) alone.The build file that cargo-bazel writes into the committed copy names
@platformsas well, and Bazel reports the first unseen repository it meets. On the Linux runners with Bazel 9.3.2 the query named@platformsin three recent runs of thecargo / bazel (9.3.2, e9)job, on two pull requests that do not change this flow, and the flow failed on its own check:What changes
platformsor one of the crate hub's. Anything else is a different failure.docs/ecosystems.md(the section on the build file in a vendored crate) said the two commands end on the dependency's repository. It now says they can end on@platformsas well.Tests and one docs sentence: nothing a command does changes.
Code review
Six findings; four are applied in the second commit.
from main repository), so the same words about another repository's view do not pass; the two names are no longer a format string with a quote hidden in one of them.cqueryto the hub's name alone. It wasquerythat named@platformsin the three runs, but nothing fixes the order forcqueryeither, and the flow is about the command failing on a repository the main repository does not see.--keep_going, or reading the names out of the rendered build file). It is a larger change to a flow that takes minutes to run on each of three Bazel releases; the accepted names are the two the rendered file was seen to produce.How it was checked
rustfmt --checkon the file,cargo clippy --locked -p socket-patch-cli --test e2e_bazel_build -- -D warnings, and the new test without Bazel.Generated by Claude Code