Skip to content

Update Cargo install command to use --locked option to fix #8186#8731

Merged
jdx merged 1 commit intojdx:mainfrom
rtharston:patch-1
Mar 23, 2026
Merged

Update Cargo install command to use --locked option to fix #8186#8731
jdx merged 1 commit intojdx:mainfrom
rtharston:patch-1

Conversation

@rtharston
Copy link
Copy Markdown
Contributor

Installing mise using cargo install mise as instructed by the documentation currently leads to a build error related to a crate version mismatch, as seen in #8186. The error seems to stem from a dependency, but the correct fix isn't to wait for the dependencies to resolve themselves. The mise build should be using the locked versions. (So this is really a cargo issue since it doesn't use --locked by default apparently...)

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 23, 2026

Greptile Summary

This PR fixes a documented build failure (#8186) by adding the --locked flag to the cargo install mise command in the installation docs, ensuring Cargo uses the dependency versions pinned in Cargo.lock rather than resolving potentially incompatible newer versions.

  • Core fix is correct: cargo install --locked mise is the right solution for users hitting dependency version-mismatch errors.
  • Two related occurrences not updated: The inline text reference on line 105 (compile it with \cargo install mise`) and the git-based install command on line 167 (cargo install mise --git … --branch main) still use the old form without --locked` and would benefit from the same treatment for consistency.

Confidence Score: 5/5

  • Documentation-only change that is safe to merge; the core fix is correct and the two remaining suggestions are non-blocking style improvements.
  • The change is a one-line documentation fix with no code or logic impact. The --locked flag is the correct solution for the reported issue. The two un-updated occurrences are minor inconsistencies that do not block merging.
  • No files require special attention.

Important Files Changed

Filename Overview
docs/installing-mise.md Adds --locked to the primary cargo install mise command to fix dependency version-mismatch build failures; two other occurrences of the same command (inline reference on line 105, git-install on line 167) were not updated.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User runs cargo install mise] --> B{--locked flag present?}
    B -- No --> C[Cargo resolves latest dependency versions]
    C --> D[Version mismatch with Cargo.lock]
    D --> E[Build error - issue #8186]
    B -- Yes --> F[Cargo uses locked versions from Cargo.lock]
    F --> G[Dependencies match expected versions]
    G --> H[Build succeeds]
Loading

Comments Outside Diff (2)

  1. docs/installing-mise.md, line 105 (link)

    P2 Inline reference still shows command without --locked

    Line 105 references cargo install mise as an inline snippet and points the reader to the section below. Now that the section below uses --locked, this inline reference is slightly inconsistent — a user who copies the inline snippet directly would still hit the same version-mismatch issue.

  2. docs/installing-mise.md, line 167 (link)

    P2 Git-based install also missing --locked

    The "build from latest commit in main" command has the same potential for dependency version mismatches that motivated this PR. --locked instructs Cargo to respect the Cargo.lock checked into the repository, so it's equally beneficial here.

Reviews (1): Last reviewed commit: "Update Cargo install command to use --lo..." | Re-trigger Greptile

@jdx jdx merged commit 4178588 into jdx:main Mar 23, 2026
35 of 36 checks passed
jdx pushed a commit that referenced this pull request Mar 24, 2026
### 🚀 Features

- **(github)** add github_tokens.toml, git credential fill, and `mise
github token` command by @jdx in
[#8742](#8742)
- **(registry)** add tart by @mnm364 in
[#8727](#8727)

### 🐛 Bug Fixes

- **(python)** respect precompiled flavor when excluding freethreaded
builds by @risu729 in [#8745](#8745)
- **(shim)** revert shims directory check that caused hangs on macOS by
@jdx in
[e1b8ca4](e1b8ca4)

### 📚 Documentation

- **(python)** swap docs for python.precompiled_arch and
python.precompiled_os by @risu729 in
[#8744](#8744)

### 🧪 Testing

- **(test_tool)** redirect stderr to stdout and strip ansi codes by
@risu729 in [#8738](#8738)

### New Contributors

- @rtharston made their first contribution in
[#8731](#8731)
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