Use --locked for Rust cargo install commands#1661
Merged
Conversation
Co-authored-by: j178 <10510431+j178@users.noreply.github.com>
Co-authored-by: j178 <10510431+j178@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add option to allow installing Rust tools with --locked
Use Feb 17, 2026
--locked for Rust cargo install commands
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1661 +/- ##
=======================================
Coverage 91.78% 91.78%
=======================================
Files 96 96
Lines 19066 19067 +1
=======================================
+ Hits 17499 17500 +1
Misses 1567 1567 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.00% (23.8 MiB → 23.8 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
j178
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust hooks can break when dependency versions change between installations.
cargo installwithout--lockedwill resolve dependencies freshly, potentially pulling incompatible versions even whenCargo.lockexists.Changes
--lockedflag to bothcargo installinvocations incrates/prek/src/languages/rust/rust.rs:cargo install --path . --lockedcargo install <package> --lockeddocs/languages.mdExample
Note: Packages without a
Cargo.lockwill have--lockedignored by cargo (not an error).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
mirrors.aliyun.com/home/REDACTED/work/prek/prek/target/debug/prek /home/REDACTED/work/prek/prek/target/debug/prek install-hooks -incompat bmemchr-1fe43bea993d3235.rlib breg�� bsyn-2136fc17f010f281.rlib 3pURqBq1pk3divZeIfIb/target/release/deps/prek_rust_echo_lib_deps-59bce7d6001d3263.prek_rust_echo-c 3pURqBq1pk3divZeIfIb/target/release/deps/prek_rust_echo_lib_deps-59bce7d6001d3263.e4dqohtw0l0ytrcore.useBuiltinFSMonitor=false lib 6ed2694.rlib 3pURqBq1pk3divZecommit.gpgsign=false b/rustlib/x86_64-c b/ru�� b/rustlib/x86_64-c b/rustlib/x86_64core.autocrlf=false b/rustlib/x86_64-c b/rustlib/x86_64/usr/bin/git b/rustlib/x86_64-c b/rustlib/x86_64core.useBuiltinFSMonitor=false b/rustlib/x86_64rev-parse(dns block)/home/REDACTED/work/prek/prek/target/debug/prek /home/REDACTED/work/prek/prek/target/debug/prek install --install-hooks /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.1nzs07cgjxiexpa7i3g2b01rt.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.24lsa75b6fov0tk3qt95numqq.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.27k9375t0pciii4hjcyuhgf4w.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.2gbphvwl0vvhd1w9zm3ido74e.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.2i6mzsq4vdcksvs36vquiynd0.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.2mdk2h4p88ofn49ujd91zdlk0.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.30nea9p9x6pr2�� /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.33cvujd6pv5nrd021hs6r57ur.1elqi5j.rcgu.o /home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.33svn44fanwynb1ljchzak5c5.1elqi5j.rcgu.o u.1.�� in.so /lto-wrapper 1.93-x86_64-REDACTED-linux-gnu/bi-c -f448dbb239ade73cc 0a5a4d1a26cf608--m64 orznfljxz.rcgu.o/tmp/rustcq8iZJY/symbols.o 1.93-x86_64-unkn/home/REDACTED/work/prek/prek/target/debug/deps/install-cf41a32d524c5058.0b78bzeosorigin(dns block)Co-authored-by: j178 <10510431+j17--eh-frame-hdr` (dns block)
Co-authored-by: j178 <10510431+j17--eh-frame-hdr` (dns block)
Co-authored-by: j178 <10510431+j17--eh-frame-hdr` (dns block)
Original prompt
--locked#1567✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.