jdx/mise · error
unsupported lockfile format
Error message
unsupported lockfile format {} What it means
While deserializing a `LockfileTool` from a lockfile document, mise switches on a format/version discriminator stored per tool entry. Any value other than the recognized lockfile formats hits this bail, meaning the file was written by a newer (or otherwise unrecognized) mise format than this binary understands.
Solutions
- Upgrade mise to the version that wrote the lockfile (the format tag is newer than your binary supports).
- If you must stay on the older mise, regenerate the lockfile with that version: delete the lockfile and run `mise lock`.
- Restore the lockfile from git or a backup if the format field was corrupted by editing or a partial write.
Example fix
// before: older mise cannot read the new format mise install # unsupported lockfile format 2 // after mise self-update && mise install
Defensive patterns
Strategy: fallback
Validate before calling
null
Prevention
- Keep mise updated on all machines that touch the repo's lockfile.
- Do not downgrade mise below the version that wrote the current lockfile format.
- Restore lockfiles from git if a manual edit corrupts the format field.
When it happens
Trigger: Reading a mise.lock (or monorepo root lockfile) produced by a newer mise release whose per-tool format tag is unknown to the running binary; a hand-edited lockfile with a corrupted format field; truncated/corrupted file content after a failed write.
Common situations: Rolling back mise (downgrade) after a teammate upgraded lockfile formats; switching branches between lockfile format generations with an older mise on PATH; partially synced lockfiles in CI caches.
Related errors
- incompatible monorepo lockfile formats; run `mise lock…
- additional_artifacts must be an array in lockfile
- aube lockfile mapping keys must be strings
- aube lockfile must contain a mapping
- cannot merge lockfile version
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f4a0b67a5bc76caa.
Report an issue: GitHub.
Appendix: source
Thrown at src/lockfile.rs:4679
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(),
specifiers,
options,
platforms,
aube,
uv,
}
}
_ => bail!("unsupported lockfile format {}", value),
};
Ok(tool)
}
}
impl LockfileTool {
fn into_toml_value(self, include_specifiers: bool) -> 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 include_specifiers && !self.specifiers.is_empty() {
table.insert(
"specifiers".to_string(),
self.specifiers.into_iter().collect::<Vec<_>>().into(),
);
}View on GitHub (pinned to 533346cc37)