Repository navigation
build(just): lint and document the codegen workspace, as CI does - #834
Merged
nihalpasham merged 2 commits intoAug 12, 2026
Merged
Conversation
`just check` claims to run CI's gates minus a named few, and two of its
recipes were narrower than the jobs they mirror. Both miss
`crates/rustc-codegen-cuda`, which carries its own `[workspace]` for the
rustc_private dylibs so `--workspace` from the root stops at that
boundary. The `test` recipe already handles that crate the same way; these
two never did.
* clippy: CI lints three scopes -- root workspace, the codegen
workspace, and once per example. The recipe ran only the first, and
ran it as `--all-targets --lib --tests`, where the target-selection
flags narrow what `--all-targets` would have covered and so skip bin
and example targets CI lints -- `cuda-host/examples/` among them. Now
`--workspace --all-targets`, matching CI, plus the codegen workspace.
* doc-check: the docs gate builds this workspace's rustdoc separately
under `-D warnings` too. That job is mine, from NVIDIA#725, and I did not
add it here.
The per-example clippy pass stays CI-only, and `check`'s comment now says
so rather than implying clippy is covered in full: it is one clippy run per
example across 200-odd separate workspaces, which belongs in a CI job
rather than in a command someone waits on.
Verified: both widened recipes pass here -- `just clippy` clean across
both workspaces, `just doc-check` builds the codegen rustdoc
warning-free -- so this closes a coverage gap without landing new work.
Signed-off-by: Vyncint Ng <[email protected]>
This was referenced Aug 12, 2026
…n-workspace passes Signed-off-by: nihalpasham <[email protected]>
Collaborator
|
Gist: the two codegen-workspace passes (clippy and warning-free rustdoc, cd-into-workspace) genuinely mirror the dedicated CI steps in clippy.yml and docs.yml and close a real local/CI gap for the one crate outside the root workspace. The comment's rationale was wrong, though: cargo target flags are additive, so the old Verified here:
Landing once CI is green (before #835, which stacks this branch). |
nihalpasham
approved these changes
Aug 12, 2026
nihalpasham
pushed a commit
that referenced
this pull request
Aug 13, 2026
`clippy` gained a second pass for crates/rustc-codegen-cuda in #834, because that crate carries its own [workspace] and no root invocation crosses that boundary. `clippy-fix` did not, so a warning the gate reports there had no `--fix` pass to answer it -- the one place where fix mode was useful and absent. The root line only changes spelling, to match `clippy`: target flags are additive and the virtual root workspace has no default-members, so `--all-targets --lib --tests` already selected the same members and targets. Verified: `just clippy-fix` runs both passes (the second reaches `rustc_codegen_cuda`), exits 0 on a clean tree, and rewrites nothing. Signed-off-by: Vyncint Ng <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
just checkclaims to run CI's gates minus a named few. Two of its recipes werenarrower than the jobs they mirror, both in the same way: they miss
crates/rustc-codegen-cuda, which carries its own[workspace]for therustc_privatedylibs, so--workspacefrom the root stops at that boundary.The
testrecipe already handles that crate (cd crates/rustc-codegen-cuda && cargo test --lib). These two never did.clippy
CI lints three scopes; the recipe ran one:
just clippy(before)cargo clippy --workspace --all-targetscargo clippy --all-targets --lib --testscd crates/rustc-codegen-cuda && cargo clippy --all-targetsTwo problems in that first cell: no
--workspace, and--all-targets --lib --testsnarrows target selection, so it skips bin and example targets CIlints —
cuda-host/examples/finalize_nvvm_ir.rsamong them. Now--workspace --all-targets, matching CI, plus the codegen workspace.doc-check
The docs gate builds this workspace's rustdoc separately under
-D warningstoo. That job is mine, from #725, and I did not add it here — same omission
as #814's missing timeout.
The per-example pass stays CI-only
It is one clippy run per example across 200-odd separate workspaces — a CI job,
not something to wait on locally.
check's comment now names it as CI-onlyrather than implying clippy is covered in full, which is the part that was
actually misleading.
Verification
Both widened recipes pass here, which was the real risk — widening a gate
can surface new lints:
just clippy— clean across both workspaces, 0 issues, exit 0;just doc-check— builds the codegen rustdoc warning-free, exit 0.So this closes a coverage gap without landing new work.
Merge order
#835 is stacked on this one. Both edit the same
Still CI-only:sentence —this PR adds clippy's per-example pass to it, #835 removes naming-guard — so they
conflicted until #835 was rebased onto this branch. Merging this one first keeps
that resolution valid; if #835 lands first its squash carries this change too and
this PR becomes an empty duplicate.
#836 and #838 also touch the
Justfile/manifests but at unrelated lines, and Iverified all five merge clean in either order after the rebase.