Repository navigation
Conversation
|
c5502e4 to
e31d67c
Compare
a54b02d to
bd53f25
Compare
bd53f25 to
7acb2ff
Compare
28fae9d to
324b317
Compare
| for argv in argvs { | ||
| assert!( | ||
| commands.contains(&argv), | ||
| "ci.yml does not run `{argv}` for ClippyWindows" |
There was a problem hiding this comment.
native_clippy_windows_runs_what_ci_runs searches the flattened contents of the entire workflow. Because the Linux rustdoc job contains the same cargo doc command, this test would still pass if that command were removed from the Windows job. The new test therefore does not protect against the Windows CI coverage drifting out of sync.
Knowledge Base Used: Build and release automation
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
`rustdoc (non-GUI crates)` runs on ubuntu-latest, so a `cfg`-gated doc target that exists on Linux and macOS but not on Windows leaves an intra-doc link that resolves everywhere CI looks. The module docs of `openlogi-permissions` linking `PermissionStatus::Unknown`, which is not declared on Windows, were exactly that: the crate's docs failed to build on Windows alone until AprilNEA#1679 escaped the link by hand. A broken intra-doc link is neither a compile error nor a clippy lint, so the existing Windows job could not catch it either. Running the rustdoc job's own command there closes the gap: the toolchain and cache are already set up, so it costs one doc build and no new runner.
The Windows job's default shell is pwsh, where a trailing backslash is not a line continuation. It parsed --exclude as a unary operator and the step failed before cargo ran, which is how the job this PR adds the step to went red. bash rather than folding the command onto one line, so it stays byte-identical to the Linux rustdoc job it exists to mirror.
CI's `clippy (windows)` job now runs the non-GUI `cargo doc` line after clippy, but `cargo xtask ci clippy-windows` on a Windows host still planned clippy alone. A Windows contributor could get a green local run while the Windows-only rustdoc check this branch adds would fail in CI. The native plan now runs the same `cargo doc` step as the `rustdoc` job, shared through one helper so the two cannot drift. The cross-lint proxy used on other hosts is unchanged: it lints a ring-free crate subset for the GNU target and was never that job. A test pins the native plan to the commands ci.yml runs, docs step included.
795cc12 to
bb76b7a
Compare
Summary
A rustdoc failure that shows up only on Windows can't be caught by CI today.
rustdoc (non-GUI crates)runs on ubuntu-latest, so a doc link whose target iscfg-gated off on Windows still resolves everywhere CI checks. That exact bug reached master inopenlogi-permissions: the module docs linked toPermissionStatus::Unknown, which isn't declared on Windows, socargo docfailed there. #1679 has since fixed that link by hand. This PR adds the check that would have caught it.An earlier version of this PR also fixed the
openlogi-permissionslink itself, and before thatci.ymlline-continuation parsing under CRLF. Master has fixed both independently, so those commits were dropped on rebase.Changes
.github/workflows/ci.yml: after clippy, theclippy (windows)job now runs the samecargo doccommand as therustdocjob. The job already sets up the toolchain and cache, so the cost is one doc build and no extra runner. The step runs under bash so the wrapped command parses.xtask: on a Windows host,cargo xtask ci clippy-windowsruns the same docs step after clippy, through one helper shared with therustdocjob. A test checks that this plan matches the commandsci.ymlruns. Other hosts still lint Windows by cross-compiling, as before..agents/rules/ci.md: the CI job table lists the new docs step.Testing
Windows 11 Pro,
RUSTFLAGS="-D warnings", rebased onto currentmaster: