Skip to content

Conversation

@fasterthanlime
Copy link
Contributor

@fasterthanlime fasterthanlime commented Dec 11, 2025

Summary

Changes

New pre-push subcommand

The pre-push subcommand runs checks only on crates affected by changes:

  • Detects changed files since merge-base with origin/main
  • Identifies affected crates from file paths
  • Runs cargo clippy -p <crate>, cargo test -p <crate>, and cargo test --doc -p <crate> for each affected crate
  • Provides colorized output showing which checks passed/failed

Windows compatibility

  • Makes executable bit handling conditional on Unix platforms with #[cfg(unix)]
  • Allows the tool to work on Windows where executable bits don't exist
  • Credits: @boringcactus

Dependency updates

  • fs-err: 3.1.0 → 3.2.0
  • log: 0.4.27 → 0.4.29
  • owo-colors: 4.2.1 → 4.2.3

GitHub Actions updates

  • actions/checkout: v5 → v6
  • github/codeql-action: v3 → v4

Test plan

  • Build succeeds: cargo build
  • Tests pass: cargo test
  • Clippy passes: cargo clippy -- -D warnings
  • Verify pre-push subcommand works: cargo run -- pre-push (requires changes in a git branch)

- Implement `pre-push` subcommand that runs targeted checks on modified crates
  - Detects changed files since merge-base with origin/main
  - Identifies affected crates from file paths
  - Runs clippy, tests, and doc-tests only for affected crates
  - Provides clear, colorized output for check results

- Update dependencies:
  - fs-err: 3.1.0 -> 3.2.0
  - log: 0.4.27 -> 0.4.29
  - owo-colors: 4.2.1 -> 4.2.3

- Update GitHub Actions:
  - actions/checkout: v5 -> v6
  - github/codeql-action: v3 -> v4

Resolves facet-rs/facet#1247
Make executable bit handling conditional on Unix platforms:
- Add #[cfg(unix)] to PermissionsExt import
- Make Job.executable field Unix-only
- Conditionally check/set executable bits only on Unix
- On Windows, skip executable bit checks entirely

Co-authored-by: boringcactus <[email protected]>
@fasterthanlime fasterthanlime merged commit a36e348 into main Dec 11, 2025
7 checks passed
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.

Optimize pre-commit/pre-push hooks to only run on touched crates

2 participants