Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1968 +/- ##
========================================
Coverage 92.32% 92.32%
========================================
Files 119 119
Lines 24432 24328 -104
========================================
- Hits 22558 22462 -96
+ Misses 1874 1866 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates v0.4 documentation, tests, and language resolvers to remove absolute-path language_version support (Bun/Go/Node/Python/Ruby) and simplifies matching logic; also changes hook installation so generated Git hook scripts no longer embed global CLI flags.
Changes:
- Remove
language_versionabsolute-path parsing/matching for Bun/Go/Node/Python/Ruby and update installers accordingly. - Update hook installation code and snapshots so installed hook scripts no longer include global flags (
-q/-v/--no-progress). - Refresh docs and tests to reflect the new
language_versionformats and hook script output.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/languages.md | Removes documentation claiming absolute-path language_version support for several languages. |
| docs/configuration.md | Adjusts Python language_version examples to match supported forms. |
| crates/prek/tests/languages/ruby.rs | Removes path-based Ruby language_version test coverage and simplifies config generation. |
| crates/prek/tests/install.rs | Updates install snapshots and removes tests asserting global flags are embedded in hook scripts. |
| crates/prek/src/main.rs | Stops passing global quiet/verbose/no-progress values into install/init-template-dir flows. |
| crates/prek/src/languages/rust/version.rs | Simplifies RustRequest::matches signature and updates tests. |
| crates/prek/src/languages/rust/installer.rs | Updates Rust installer matching calls to new signature. |
| crates/prek/src/languages/ruby/version.rs | Removes Ruby path request variant and related parsing/matching/tests. |
| crates/prek/src/languages/ruby/installer.rs | Updates Ruby installer matching calls to version-only matching. |
| crates/prek/src/languages/python/version.rs | Removes Python path request variant and updates parsing/docs/tests accordingly. |
| crates/prek/src/languages/python/python.rs | Removes conversion of Python path requests to uv requests. |
| crates/prek/src/languages/node/version.rs | Removes Node path request variant and updates parsing/matching/tests accordingly. |
| crates/prek/src/languages/node/installer.rs | Updates Node installer matching calls to version-only matching. |
| crates/prek/src/languages/golang/version.rs | Removes Go path request variant and updates parsing/matching/tests accordingly. |
| crates/prek/src/languages/golang/installer.rs | Updates Go installer matching calls to version-only matching. |
| crates/prek/src/languages/bun/version.rs | Removes Bun path request variant and updates parsing/matching/tests accordingly. |
| crates/prek/src/languages/bun/installer.rs | Updates Bun installer matching calls to version-only matching. |
| crates/prek/src/cli/install.rs | Removes rendering/injection of global args into generated hook scripts and simplifies the template. |
📦 Cargo Bloat ComparisonBinary size change: -0.38% (26.2 MiB → 26.1 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
⚡️ Hyperfine BenchmarksSummary: 0 regressions, 0 improvements above the 10% threshold. Environment
CLI CommandsBenchmarking basic commands in the main repo:
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base --version |
2.5 ± 0.1 | 2.3 | 3.1 | 1.01 ± 0.05 |
prek-head --version |
2.4 ± 0.1 | 2.3 | 2.8 | 1.00 |
prek list
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base list |
9.6 ± 0.2 | 9.1 | 10.2 | 1.00 ± 0.03 |
prek-head list |
9.6 ± 0.2 | 9.2 | 10.5 | 1.00 |
prek validate-config .pre-commit-config.yaml
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base validate-config .pre-commit-config.yaml |
3.4 ± 0.1 | 3.3 | 3.7 | 1.00 ± 0.03 |
prek-head validate-config .pre-commit-config.yaml |
3.4 ± 0.1 | 3.3 | 3.6 | 1.00 |
prek sample-config
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base sample-config |
2.8 ± 0.1 | 2.6 | 2.9 | 1.00 |
prek-head sample-config |
2.8 ± 0.1 | 2.7 | 2.9 | 1.01 ± 0.03 |
Cold vs Warm Runs
Comparing first run (cold) vs subsequent runs (warm cache):
prek run --all-files (cold - no cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
147.7 ± 4.3 | 139.1 | 154.6 | 1.00 ± 0.04 |
prek-head run --all-files |
147.1 ± 2.8 | 142.3 | 150.8 | 1.00 |
prek run --all-files (warm - with cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
145.7 ± 3.9 | 139.1 | 151.3 | 1.00 ± 0.04 |
prek-head run --all-files |
145.1 ± 4.1 | 139.7 | 152.2 | 1.00 |
Full Hook Suite
Running the builtin hook suite on the benchmark workspace:
prek run --all-files (full builtin hook suite)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --all-files |
146.1 ± 4.1 | 139.2 | 155.6 | 1.01 ± 0.04 |
prek-head run --all-files |
144.3 ± 3.5 | 138.4 | 151.7 | 1.00 |
Individual Hook Performance
Benchmarking each hook individually on the test repo:
prek run trailing-whitespace --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run trailing-whitespace --all-files |
21.5 ± 1.0 | 20.4 | 25.2 | 1.01 ± 0.05 |
prek-head run trailing-whitespace --all-files |
21.3 ± 0.5 | 20.5 | 22.4 | 1.00 |
prek run end-of-file-fixer --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run end-of-file-fixer --all-files |
27.6 ± 2.2 | 24.5 | 31.8 | 1.03 ± 0.11 |
prek-head run end-of-file-fixer --all-files |
26.9 ± 2.0 | 23.6 | 31.0 | 1.00 |
prek run check-json --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-json --all-files |
12.8 ± 0.2 | 12.5 | 13.4 | 1.02 ± 0.04 |
prek-head run check-json --all-files |
12.5 ± 0.4 | 11.9 | 13.3 | 1.00 |
prek run check-yaml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-yaml --all-files |
11.8 ± 0.3 | 11.4 | 12.7 | 1.01 ± 0.03 |
prek-head run check-yaml --all-files |
11.7 ± 0.2 | 11.4 | 12.1 | 1.00 |
prek run check-toml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-toml --all-files |
11.9 ± 0.4 | 11.5 | 13.8 | 1.00 ± 0.05 |
prek-head run check-toml --all-files |
11.8 ± 0.3 | 11.4 | 12.8 | 1.00 |
prek run check-xml --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-xml --all-files |
11.9 ± 0.3 | 11.6 | 12.7 | 1.01 ± 0.03 |
prek-head run check-xml --all-files |
11.8 ± 0.2 | 11.4 | 12.2 | 1.00 |
prek run detect-private-key --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run detect-private-key --all-files |
17.9 ± 1.2 | 16.1 | 20.7 | 1.02 ± 0.08 |
prek-head run detect-private-key --all-files |
17.7 ± 0.9 | 15.9 | 19.2 | 1.00 |
prek run fix-byte-order-marker --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run fix-byte-order-marker --all-files |
22.2 ± 1.6 | 19.8 | 25.1 | 1.00 |
prek-head run fix-byte-order-marker --all-files |
22.7 ± 1.6 | 19.7 | 25.7 | 1.02 ± 0.10 |
Installation Performance
Benchmarking hook installation (fast path hooks skip Python setup):
prek install-hooks (cold - no cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base install-hooks |
4.9 ± 0.0 | 4.9 | 4.9 | 1.01 ± 0.01 |
prek-head install-hooks |
4.9 ± 0.0 | 4.8 | 4.9 | 1.00 |
prek install-hooks (warm - with cache)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base install-hooks |
4.9 ± 0.0 | 4.9 | 4.9 | 1.00 |
prek-head install-hooks |
5.0 ± 0.1 | 4.9 | 5.1 | 1.02 ± 0.01 |
File Filtering/Scoping Performance
Testing different file selection modes:
prek run (staged files only)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run |
50.4 ± 0.8 | 49.0 | 51.8 | 1.00 |
prek-head run |
51.8 ± 3.2 | 49.3 | 61.7 | 1.03 ± 0.07 |
prek run --files '*.json' (specific file type)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --files '*.json' |
8.7 ± 0.1 | 8.6 | 8.9 | 1.00 |
prek-head run --files '*.json' |
8.7 ± 0.1 | 8.5 | 8.9 | 1.00 ± 0.01 |
Workspace Discovery & Initialization
Benchmarking hook discovery and initialization overhead:
prek run --dry-run --all-files (measures init overhead)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run --dry-run --all-files |
10.9 ± 0.2 | 10.8 | 11.5 | 1.00 ± 0.02 |
prek-head run --dry-run --all-files |
10.9 ± 0.1 | 10.8 | 11.0 | 1.00 |
Meta Hooks Performance
Benchmarking meta hooks separately:
prek run check-hooks-apply --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-hooks-apply --all-files |
13.3 ± 0.1 | 13.1 | 13.4 | 1.06 ± 0.06 |
prek-head run check-hooks-apply --all-files |
12.5 ± 0.7 | 11.9 | 13.7 | 1.00 |
prek run check-useless-excludes --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run check-useless-excludes --all-files |
11.8 ± 0.1 | 11.6 | 12.0 | 1.00 ± 0.01 |
prek-head run check-useless-excludes --all-files |
11.7 ± 0.1 | 11.6 | 11.9 | 1.00 |
prek run identity --all-files
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
prek-base run identity --all-files |
10.7 ± 0.1 | 10.5 | 11.0 | 1.00 |
prek-head run identity --all-files |
10.9 ± 0.1 | 10.7 | 11.2 | 1.02 ± 0.02 |
Closes #1581 Remove direct path handling from `language_version` request parsing across languages This path support never actually worked, so this likely should not be considered a breaking change.
No description provided.