Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/update-local-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ build_repo() {
return 1
fi
elif [ -f "$build_dir/Cargo.toml" ]; then
if (cd "$build_dir" && cargo update 2>&1 && cargo +nightly build --release 2>&1); then
if (cd "$build_dir" && cargo +nightly build --release 2>&1); then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium

Removing cargo update preserves upstream dependency versions, which is good for reproducibility. However, this script doesn't appear to pull/update the git repositories before building. Consider adding a git pull or similar mechanism to ensure you're building the latest upstream code, otherwise you may be building stale versions with stale dependencies. This would be particularly important if these repositories receive security updates.

Fix in Cursor • Fix in Claude

Prompt for Agent
Task: Address review feedback left on GitHub.
Repository: shunkakinoki/dotfiles#1320
File: scripts/update-local-binaries.sh#L161
Action: Open this file location in your editor, inspect the highlighted code, and resolve the issue described below.

Feedback:
Removing `cargo update` preserves upstream dependency versions, which is good for reproducibility. However, this script doesn't appear to pull/update the git repositories before building. Consider adding a `git pull` or similar mechanism to ensure you're building the latest upstream code, otherwise you may be building stale versions with stale dependencies. This would be particularly important if these repositories receive security updates.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To fully adhere to the goal of preserving Cargo.lock versions as stated in the PR title and description, consider adding the --locked flag. This ensures that the build will use the exact dependency versions specified in the lockfile and will fail if the lockfile is out of sync with Cargo.toml, preventing any unintended automatic updates during the build process.

Suggested change
if (cd "$build_dir" && cargo +nightly build --release 2>&1); then
if (cd "$build_dir" && cargo +nightly build --release --locked 2>&1); then

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fully align with the goal of preserving Cargo.lock, consider adding --locked to the cargo build invocation. Without --locked, Cargo can still rewrite the lockfile in some scenarios (e.g., lockfile format normalization, resolver differences, or when the lock is out-of-date), which can leave the repo dirty and undermines the intent of removing cargo update.

Suggested change
if (cd "$build_dir" && cargo +nightly build --release 2>&1); then
if (cd "$build_dir" && cargo +nightly build --release --locked 2>&1); then

Copilot uses AI. Check for mistakes.
return 0
else
return 1
Expand Down
Loading