Skip to content

chore: Update all cargo install references to use --locked - #2739

Merged
CTTY merged 1 commit into
apache:mainfrom
dannycjones:lock-cli-installs
Jun 29, 2026
Merged

CTTY merged 1 commit into
apache:mainfrom
dannycjones:lock-cli-installs

Conversation

@dannycjones

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Addresses follow-up item: #2627 (review)

What changes are included in this PR?

This change ensures that all CLI installs via Cargo will install using the same dependency graph as the crate was published with, avoiding dependencies silently changing. Sometimes patch version updates are fine, although occasionally breaking changes can slip in. This change standardizes all installs in the codebase to recommend using --locked.

Are these changes tested?

Tested by running the tools locally.

This change ensures that all CLI installs via Cargo will install using the same dependency graph as the crate was published with, avoiding dependencies silently changing. Usually patch version updates are fine, although occasionally breaking changes can slip in.
This change standardizes all installs in the codebase to recommend using --locked.
Tested by running the tools locally.

Addresses follow-up item: apache#2627 (review)

@CTTY CTTY left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@CTTY
CTTY merged commit ab27bba into apache:main Jun 29, 2026
21 checks passed
@dannycjones
dannycjones deleted the lock-cli-installs branch June 29, 2026 22:05
kevinjqliu pushed a commit that referenced this pull request Jun 30, 2026
## Which issue does this PR close?

N/A

## What changes are included in this PR?

We moved all CLI installs to `--locked` in #2739. Unfortunately, this
doesn't work for `toml-cli` as it is not regularly updated and its lock
file refers to outdated dependencies. In particular, it points to crates
which use nightly unstable features which no longer exist.

This change removes `--locked` and adds a comment to explain why.

Alternatively, we could use the stable toolchain here although I think
it's OK to use newer dependencies instead.

## Are these changes tested?

Manually tested, the following command succeeds:

```
cargo +nightly-2026-03-05 install toml-cli --force
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants