jdx/mise · error
unsupported lockfile format {}
Error message
unsupported lockfile format {} What it means
Each element of a tools.<short> array in mise.lock must itself be a table (parsed for version, backend, options, platforms keys at src/lockfile.rs:3445-3467). A non-table element — e.g. a bare version string inside the array — bails with "unsupported lockfile format {}".
Source
Thrown at src/lockfile.rs:3466
}
// Silently discard env field from old lockfiles for backwards compat
t.remove("env");
LockfileTool {
version: t
.remove("version")
.map(|v| v.try_into())
.transpose()?
.unwrap_or_default(),
backend: t
.remove("backend")
.map(|v| v.try_into())
.transpose()?
.unwrap_or_default(),
options,
platforms,
}
}
_ => bail!("unsupported lockfile format {}", value),
};
Ok(tool)
}
}
impl LockfileTool {
fn into_toml_value(self) -> toml::Value {
let mut table = toml::Table::new();
table.insert("version".to_string(), self.version.into());
if let Some(backend) = self.backend {
table.insert("backend".to_string(), backend.into());
}
if !self.options.is_empty() {
let opts_table: toml::Table = self
.options
.into_iter()
.map(|(k, v)| (k, toml::Value::String(v)))
.collect();View on GitHub (pinned to 6f52dcdf99)
Solutions
- Regenerate the lockfile: rm mise.lock && mise lock.
- Align mise versions between the machine that wrote the lockfile and the one reading it.
- Never hand-edit [[tools.<name>]] entries.
Example fix
# before (mise.lock) [[tools.node]] # entry accidentally replaced by: tools.node = ["22.0.0"] # after — regenerate $ rm mise.lock && mise lock
Defensive patterns
Strategy: validation
Validate before calling
# CI guard: each tools.<short> element must be a table
python3 -c "
import tomllib
for name, entries in tomllib.load(open('mise.lock', 'rb')).get('tools', {}).items():
for e in entries:
if not isinstance(e, dict):
raise SystemExit('tools.%s entry must be a table, got %r' % (name, e))
" Try / catch
"unsupported lockfile format …" on a tools entry means the element type is wrong (e.g. bare string in the array): rm mise.lock && mise lock with an aligned mise version. Treat it as generated-output corruption — regeneration, not repair.
Prevention
- Never hand-simplify lockfile entries to bare version strings.
- Regenerate lockfiles after version bumps and bad merges.
- Run a TOML shape assertion on mise.lock in CI before mise install.
When it happens
Trigger: tools.node = ["22.0.0"] — an array of strings instead of an array of tables — from hand edits or a lockfile written by a different (older or newer) mise format.
Common situations: Hand-simplifying lockfile entries; lockfiles from format transitions between mise versions; bad merge resolutions.
Related errors
- invalid lockfile format for tool {short}: expected array ([[
- additional_artifacts must be an array in lockfile
- unsupported asset info format
- unsupported conda package info format
- unsupported pkgx package info format
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/f4a0b67a5bc76caa.
Report an issue: GitHub.