Skip to content

cargo: extract lints from declared manifests only - #4274

Open
jrandolf wants to merge 1 commit into
bazelbuild:mainfrom
jrandolf:codex/upstream-cargo-lints
Open

jrandolf wants to merge 1 commit into
bazelbuild:mainfrom
jrandolf:codex/upstream-cargo-lints

Conversation

@jrandolf

@jrandolf jrandolf commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Cargo lint extraction only needs the declared package and optional workspace manifests. Fully resolving the Cargo package also reads workspace members and resources that are absent from a sandboxed Bazel action. Read the manifests directly and preserve workspace lint inheritance.

The regression covers an undeclared workspace member and resource path. The Python test lives in the test package, so downstream users do not need rules_python. A nested downstream consumer check is documented as a manual test.

Validation: both owning tests pass on macOS arm64 with Bazel 9.3.1 after rebasing onto upstream main b11ab7e2: bazel test --config=rustfmt --config=clippy //cargo/private/cargo_toml_info:unit_test //cargo/tests/cargo_toml_info:declared_manifests_test. Repository pre-commit checks and whitespace checks pass.

Closes #4290.

@jrandolf

Copy link
Copy Markdown
Contributor Author

Rebased onto upstream main at b11ab7e2. Both owning tests (//cargo/private/cargo_toml_info:unit_test and //cargo/tests/cargo_toml_info:declared_manifests_test) pass on macOS arm64 with Bazel 9.3.1, rustfmt, and clippy. Repository pre-commit checks also pass.

@jrandolf
jrandolf force-pushed the codex/upstream-cargo-lints branch from c8cc6b4 to 5aee3b9 Compare November 25, 2026 21:07
@jrandolf

Copy link
Copy Markdown
Contributor Author

@illicitonion Could you take a look? It is rebased on main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cargo lint extraction reads workspace files that are not declared action inputs

1 participant