-
-
Notifications
You must be signed in to change notification settings - Fork 86
Refactor Rust toolchain management #1198
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1198 +/- ##
==========================================
+ Coverage 89.58% 89.62% +0.04%
==========================================
Files 78 79 +1
Lines 14823 14933 +110
==========================================
+ Hits 13279 13384 +105
- Misses 1544 1549 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.00% (16.7 MiB → 16.7 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
- Reuse system installed rustup - Reuse installed rustup across hooks - Reuse installed Rust toolchains across hooks
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.
Pull request overview
This PR refactors Rust toolchain management to use rustup more efficiently and reuse installations across hooks, as indicated by the completion of TODOs from issue #989.
Key Changes:
- Migrated from standalone Rust installation to unified
rustup-based management - Introduced reuse of system-installed
rustupand installed toolchains across hooks - Renamed storage buckets:
ToolBucket::Rust→ToolBucket::RustupandCacheBucket::Rust→CacheBucket::Cargo
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/languages/rust/rustup.rs |
New module implementing rustup installation and toolchain management with system detection |
src/languages/rust/version.rs |
Enhanced Rust version representation with channel support (stable/beta/nightly) and toolchain name generation |
src/languages/rust/installer.rs |
Refactored to use Rustup abstraction instead of direct rustup commands, simplified toolchain discovery |
src/languages/rust/rust.rs |
Updated to use shared cargo_home cache and new rustup-based installer |
src/languages/rust/mod.rs |
Added rustup module export |
src/store.rs |
Renamed buckets: Rust → Rustup for tools, Rust → Cargo for cache |
tests/languages/rust.rs |
Updated test paths to reflect new tools/rustup/toolchains structure, added rustup installer test |
tests/run.rs |
Removed redundant system-rust test (coverage exists in tests/languages/rust.rs) |
crates/prek-consts/src/env_vars.rs |
Renamed constant from PREK_INTERNAL__RUST_BINARY_NAME to PREK_INTERNAL__RUSTUP_BINARY_NAME |
docs/todo.md |
Moved Rust from "WIP" to "Supported" status |
src/languages/golang/golang.rs |
Minor import cleanup (using ToolBucket directly instead of fully qualified path) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
Hey @lmmx, would you be interested in taking a look at this? |
Finish some TODOs after #989