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

  1. Upgrade mise to the version that wrote the lockfile (the format tag is newer than your binary supports).
  2. If you must stay on the older mise, regenerate the lockfile with that version: delete the lockfile and run `mise lock`.
  3. 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

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


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)