fix(natives): repaired win32 build and bazel feature drift
- Synced pi-builtins bazel crate_features with cargo's resolved default set: bazel features are literal, so the meta-features never expanded and the procs/rg cluster (nohup, pgrep, pidwait, pkill, proc-match, ps, rg, sleep, timeout, top) was silently compiled out, leaving the process builtins unregistered under bazel and failing pi-shell tests. - Repaired windows compilation of pi-builtins: cfg-gated the uucore::mode import in mkdir, imported std::env in sort's non-unix locale probe, mapped ProcInfo::pid through a closure in kill, brought MetadataExt into scope in wc, and replaced stat's unstable windows_by_handle metadata with a stable GetFileInformationByHandle query (volume serial, link count, file index, no-dereference aware). - Imported HashSet for pi-shell's windows-only PATH merge. - Added a clippy-ported bazel config + CI bucket so pi-builtins keeps its manifest-declared clippy allows under the bazel aspect while rustc warnings stay denied, and zeroed the remaining windows-target rustc warnings (unused params/imports in find, mv, rm, proc_match, ps).
This commit is contained in:
@@ -164,16 +164,21 @@ jobs:
|
||||
# test targets) plus the strict/default split: crates with
|
||||
# `[lints] workspace = true` get the workspace policy, the vendored
|
||||
# brush-core fork is exempt (same as run-rs-task.ts's cargo excludes).
|
||||
# pi-builtins lands in the default-lints bucket below: it opts out of
|
||||
# pedantic/nursery in its own manifest but is still linted.
|
||||
# pi-builtins allows every clippy group in its own manifest (ported
|
||||
# brush/uutils/jaq code) but is still held to zero rustc warnings;
|
||||
# cargo honors that via `[lints]`, bazel via the clippy-ported config.
|
||||
- name: Clippy (workspace lint policy on opted-in crates)
|
||||
run: |
|
||||
bazelisk query "kind('rust_library|rust_shared_library', //crates/pi-ast/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-voice/... + //crates/pi-walker/...)" \
|
||||
| xargs bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=clippy-strict --
|
||||
- name: Clippy (default lints elsewhere)
|
||||
run: |
|
||||
bazelisk query "kind('rust_library|rust_shared_library', //crates/... - (//crates/pi-ast/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-voice/... + //crates/pi-walker/...) - //crates/vendor/brush-core/...)" \
|
||||
bazelisk query "kind('rust_library|rust_shared_library', //crates/... - (//crates/pi-ast/... + //crates/pi-iso/... + //crates/pi-natives/... + //crates/pi-shell/... + //crates/pi-voice/... + //crates/pi-walker/...) - //crates/pi-builtins/... - //crates/vendor/brush-core/...)" \
|
||||
| xargs bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=clippy --
|
||||
- name: Clippy (manifest allows on ported pi-builtins)
|
||||
run: |
|
||||
bazelisk query "kind('rust_library|rust_shared_library', //crates/pi-builtins/...)" \
|
||||
| xargs bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=clippy-ported --
|
||||
- name: Rustfmt
|
||||
run: bazelisk --bazelrc="${{ steps.cache.outputs.rc }}" build --config=rustfmt //crates/...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user