-
-
Notifications
You must be signed in to change notification settings - Fork 124
Add upgrade suggestion option in config #1490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1490 +/- ##
==========================================
- Coverage 91.51% 91.41% -0.10%
==========================================
Files 87 87
Lines 18153 18210 +57
==========================================
+ Hits 16612 16647 +35
- Misses 1541 1563 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.00% (22.5 MiB → 22.5 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
|
Thanks for working on this. We’re pretty careful about adding new options, and I don’t think |
|
Makes sense that you don't want to bloat prek with new options here. Maybe to clarify the motivation a bit. When using prek on a large project, you typically have a well defined and automated way to setup a developers's environment. With that, we exactly know how developers have installed prek, so being able to give them a concrete command to run would be very useful. Now if we think about "the config writer doesn’t actually know how prek is installed on the user’s side", would it be possible to get to know this? Because if we would know this somehow, we would not need the |
Currently if the minimum prek version does not match, a user sees something like
It would be nice to give the user a more concrete action to fix this error. To do so, I am adding an optional filed to the config named
prek_upgrade_suggestion. This allows specifying an extra message likePlease run 'uv tool install prek'orPlease run prek self upgradewhich is shown on top of the error message above.