Implement priority based parallel execution#1232
Conversation
📦 Cargo Bloat ComparisonBinary size change: +0.00% (16.7 MiB → 16.7 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
db475ed to
cf503c4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1232 +/- ##
==========================================
+ Coverage 89.84% 90.03% +0.18%
==========================================
Files 79 80 +1
Lines 15264 15627 +363
==========================================
+ Hits 13714 14069 +355
- Misses 1550 1558 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aadac61 to
f4cd927
Compare
adb756a to
fc5faaf
Compare
fc5faaf to
9a88892
Compare
a2523a4 to
9d6a84f
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements priority-based parallel execution for hooks, allowing hooks with the same priority value to run concurrently while maintaining sequential execution for hooks with different priorities. When no priority is specified, hooks automatically receive a unique priority based on their index in the configuration file, preserving backward-compatible sequential behavior.
Key changes:
- Added
priorityfield to hook configuration (typeu32, defaults to hook index) - Hooks with same priority run in parallel, subject to global concurrency limits
- New grouped output UI for parallel hooks that modify files
- Enhanced progress reporting during hook execution
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/proposals/concurrency.md | New design proposal documenting priority-based parallel execution model |
| docs/diff.md | Added documentation about parallel execution by priority |
| docs/configuration.md | Added priority field documentation with examples |
| docs/README.md | Added feature note about parallel hook execution |
| crates/prek/src/config.rs | Added priority field to HookOptions struct |
| crates/prek/src/hook.rs | Added priority field to Hook struct with auto-assignment logic |
| crates/prek/src/cli/run/run.rs | Refactored hook execution to support priority groups and parallel execution |
| crates/prek/src/cli/reporter.rs | Added HookRunReporter for progress tracking during hook execution |
| crates/prek/src/languages/*.rs | Updated all language implementations to accept reporter parameter |
| crates/prek/src/run.rs | Simplified result collection using try_collect |
| crates/prek/tests/run.rs | Added comprehensive tests for priority ordering, fail-fast, and grouped output |
| Cargo.toml | Moved textwrap to dev-dependencies (no longer used in production) |
| crates/prek/Cargo.toml | Updated dependency configuration |
| Various test files | Updated snapshots for new output format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
priority based parallel exeuctionpriority based parallel execution
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes #1242