-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: download script for uv bin #57
base: main
Are you sure you want to change the base?
Conversation
- move uv config to package.json - compare sha256 hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great! I noticed a couple things during review and testing.
Generally, I have a idea to make it a bit easier to manage the uv
versions.
The uv
releases on GH use consistent URLs, where the checksum URL is the same as the executable, but with .sha256
appended.
For example, for macOS:
https://github.com/astral-sh/uv/releases/download/<version>/uv-aarch64-apple-darwin.tar.gz
https://github.com/astral-sh/uv/releases/download/<version>/uv-aarch64-apple-darwin.tar.gz.sha256
Instead of hardcoding executable URL and the hash in package.json
, we could:
- Record only the
uv
version inpackage.json
- Add the URL "patterns" to
download_uv.ts
- Download both executable and checksum in the download script
It's a bit more work to set up, but we can avoid the error-prone manual checksum downloading and copying.
I agree that the new configuration is slightly more cumbersome and potentially error-prone. However, the changes are intentional:
Please let me know how you’d like to proceed. |
Thanks for sharing your reasoning, it makes sense. It's not a major hassle to manually update the version & hashes. I'm happy with the setup as you've written it in this PR. I'll do a final review, test and merge in the next day or two. Thanks! |
Summary
This PR introduces a download script to simplify fetching the
uv
binary, primarily aimed at making the local development environment setup easier.Changes include:
uv
version config topackage.json
Checklist