fix(lockfile): place lockfile alongside config file#7360
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the lockfile placement behavior to align with the documented approach: lockfiles are now placed in the same directory as their corresponding config file, rather than at the project root.
Key Changes:
- Removed logic that placed lockfiles at the project root for configs in subdirectories
- Simplified the
lockfile_path_for_configfunction to always place the lockfile alongside its config file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d99b3cd to
e98eb36
Compare
Changed lockfile placement to be in the same directory as the config file, rather than always at the project root. For example: - `.config/mise.toml` → `.config/mise.lock` - `.mise/config.toml` → `.mise/mise.lock` For conf.d directories, the lockfile is placed in the parent directory so all conf.d files share the same lockfile: - `.mise/conf.d/foo.toml` → `.mise/mise.lock` Also updated `cli/lock.rs` to use `lockfile_path_for_config` for consistency between the lock command and lockfile readers. Fixes #7343 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
e98eb36 to
52dca23
Compare
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 x -- echo |
21.2 ± 1.0 | 19.5 | 27.6 | 1.00 |
mise x -- echo |
21.7 ± 1.0 | 19.6 | 24.2 | 1.02 ± 0.07 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 env |
20.6 ± 0.9 | 18.7 | 22.9 | 1.00 |
mise env |
21.1 ± 1.1 | 19.0 | 24.6 | 1.03 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 hook-env |
20.6 ± 0.9 | 18.8 | 22.8 | 1.00 |
mise hook-env |
21.4 ± 1.0 | 19.3 | 25.0 | 1.04 ± 0.07 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 ls |
18.1 ± 0.8 | 16.6 | 20.0 | 1.00 |
mise ls |
18.7 ± 1.0 | 16.9 | 21.7 | 1.03 ± 0.07 |
xtasks/test/perf
| Command | mise-2025.12.10 | mise | Variance |
|---|---|---|---|
| install (cached) | 113ms | 113ms | +0% |
| ls (cached) | 67ms | 69ms | -2% |
| bin-paths (cached) | 75ms | 75ms | +0% |
| task-ls (cached) | 288ms | -87% |
jdx
pushed a commit
that referenced
this pull request
Dec 18, 2025
### 🚀 Features - **(alias)** rename alias to tool-alias, add shell-alias command by @jdx in [#7357](#7357) - **(upgrade)** display summary of upgraded tools by @jdx in [#7372](#7372) - **(vfox)** embed vfox plugin Lua code in binary by @jdx in [#7369](#7369) ### 🐛 Bug Fixes - **(aqua)** add start_operations for progress reporting by @jdx in [#7354](#7354) - **(github)** improve asset detection for distro-specific and Swift artifacts by @jdx in [#7347](#7347) - **(github)** clean up static_helpers.rs and fix archive bin= option by @jdx in [#7366](#7366) - **(http)** add start_operations for progress reporting by @jdx in [#7355](#7355) - **(lockfile)** place lockfile alongside config file by @jdx in [#7360](#7360) - **(progress)** add start_operations to core plugins by @jdx in [#7351](#7351) - **(ruby-install)** Use ruby_install_bin to update by @calebhearth in [#7350](#7350) - **(rust)** add release_url for rust versions by @jdx in [#7373](#7373) - **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in [#7358](#7358) - **(toolset)** filter tools by OS in list_current_versions by @jdx in [#7356](#7356) - **(ubi)** only show deprecation warning during installation by @jdx in [#7380](#7380) - **(ui)** remove noisy "record size" message during install by @jdx in [#7381](#7381) - update mise-versions URL to use /tools/ prefix by @jdx in [#7378](#7378) ### 🚜 Refactor - **(backend)** unified AssetMatcher with checksum fetching by @jdx in [#7370](#7370) - **(backend)** deprecate ubi backend in favor of github by @jdx in [#7374](#7374) - **(toolset)** decompose mod.rs into smaller modules by @jdx in [#7371](#7371) ### 🧪 Testing - **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx in [052ea40](052ea40) ### 📦 Registry - add vfox-gcloud backend for gcloud by @jdx in [#7349](#7349) - convert amplify to use github backend by @jdx in [#7365](#7365) - add github backend for djinni tool by @jdx in [#7363](#7363) - switch glab to native gitlab backend by @jdx in [#7364](#7364) - add s5cmd by @jdx in [#7376](#7376) ### Chore - **(registry)** disable flaky tests for gitu and ktlint by @jdx in [64151cb](64151cb) - resolve clippy warnings and add stricter CI check by @jdx in [#7367](#7367) - suppress dead_code warnings in asset_matcher module by @jdx in [#7377](#7377) ### New Contributors - @calebhearth made their first contribution in [#7350](#7350)
jekis913
added a commit
to jekis913/mise
that referenced
this pull request
Dec 18, 2025
* upstream/main: fix(lockfile): place lockfile alongside config file (jdx#7360) feat(alias): rename alias to tool-alias, add shell-alias command (jdx#7357) fix(aqua): add start_operations for progress reporting (jdx#7354) fix(schema): add `tool_alias`, mark `alias` as deprecated (jdx#7358) fix(progress): add start_operations to core plugins (jdx#7351) fix(toolset): filter tools by OS in list_current_versions (jdx#7356) registry: add vfox-gcloud backend for gcloud (jdx#7349) fix(github): improve asset detection for distro-specific and Swift artifacts (jdx#7347)
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.
Summary
.config/mise.toml,.mise/config.toml) would have their lockfile placed at the project root.config/mise.toml→.config/mise.lock.mise/config.toml→.mise/mise.lockFixes #7343
Test plan
cargo test lockfile)mise run test:e2e e2e/lockfile/*)🤖 Generated with Claude Code
Note
Places lockfiles next to their config files (including .config, .mise, conf.d), updates
mise lockto resolve paths and scope tools by lockfile directory, and adds unit tests.lockfile_path_for_configto place lockfiles alongside configs (handles.config/,.mise/, andconf.d-> parent dir).config_rootreliance; compute lockfile dir from config path.src/cli/lock.rs):lockfile::lockfile_path_for_configinget_lockfile_path(supports--local).test_lockfile_path_for_configcovering root, local,.config,.mise, andconf.dcases.Written by Cursor Bugbot for commit 52dca23. This will update automatically on new commits. Configure here.