Skip to content

fix(xtask): remove Windows clippy error and platform-dependent paths - #27815

Open
cvp2004 wants to merge 3 commits into
apache:mainfrom
cvp2004:fix/xtask-windows
Open

cvp2004 wants to merge 3 commits into
apache:mainfrom
cvp2004:fix/xtask-windows

Conversation

@cvp2004

@cvp2004 cvp2004 commented Nov 28, 2026

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

On Windows, cargo clippy -p datafusion-xtask -- -D warnings and cargo test -p datafusion-xtask both fail, so the CI lint and test commands can't be run locally there. Details are in the issue.

What changes are included in this PR?

  • xtask/src/command.rs: remove a needless return in the #[cfg(windows)] block of executable_in.
  • xtask/src/ci_steps.rs: add a StepContext::root_path helper that appends /-separated paths to the workspace root with / instead of Path::join, and use it for the five root-relative paths. --explain output is unchanged on Linux and macOS, and on Windows it now matches the snapshots.

What is the testing strategy for this PR?

Covered by the existing ci_steps::tests::explain_all_available_ci_commands snapshot test, which now passes on Windows. Tested locally on Windows (x86_64-pc-windows-msvc): cargo test -p datafusion-xtask (10/10), cargo clippy --all-targets -p datafusion-xtask -- -D warnings, cargo fmt --all -- --check, and cargo xtask ci step test <step> --explain for the affected steps, which resolve to real paths. CI on Linux covers the unchanged behavior there.

Are there any user-facing changes?

No. This only changes internal dev tooling (xtask).

- command.rs: drop needless `return` in the cfg(windows) block of executable_in, which failed clippy -D warnings on Windows.
- ci_steps.rs: add StepContext::root_path to join root-relative paths with '/' instead of Path::join, so --explain output and the explain_all_available_ci_commands snapshot match on Windows.
- ci_steps.rs: link [`Path::join`] in the root_path doc comment instead of naming it in plain text, per the review guide's intra-doc link convention.
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.

xtask: clippy needless_return error and a snapshot test failure on Windows

1 participant