jdx/mise · error
unsupported lockfile version {lockfile_version}; this mise s
Error message
unsupported lockfile version {lockfile_version}; this mise supports up to version {CURRENT_LOCKFILE_VERSION} What it means
When parsing a mise.lock, the loader reads lockfile_version and rejects files whose version exceeds CURRENT_LOCKFILE_VERSION — the newest format this mise build understands. This forward-compatibility guard prevents mise from misinterpreting lockfile fields written by a newer release.
Source
Thrown at src/lockfile.rs:1017
true
}
pub(crate) fn read<P: AsRef<Path>>(path: P) -> Result<Self> {
let path = path.as_ref();
if !path.exists() {
return Ok(Lockfile::default());
}
trace!("reading lockfile {}", path.display_user());
let content = file::read_to_string(path)?;
let generated_header_url = existing_lockfile_doc_url(&content);
let mut table: toml::Table = toml::from_str(&content)?;
let lockfile_version = table
.remove("lockfile_version")
.map(|value| value.try_into())
.transpose()?
.unwrap_or(0);
if lockfile_version > CURRENT_LOCKFILE_VERSION {
bail!(
"unsupported lockfile version {lockfile_version}; this mise supports up to version {CURRENT_LOCKFILE_VERSION}"
);
}
let tools: toml::Table = table
.remove("tools")
.unwrap_or(toml::Table::new().into())
.try_into()?;
let mut lockfile = Lockfile {
lockfile_version,
generated_header_url,
..Default::default()
};
for (short, value) in tools {
let versions = match value {
toml::Value::Array(arr) => arrView on GitHub (pinned to afd2eddd3a)
Solutions
- Upgrade mise to at least the version that wrote the lockfile (check `mise --version` vs the lockfile_version value)
- Run `mise lock --downgrade` (or delete/regenerate mise.lock) with the older mise to rewrite it in the supported version
- Pin the same mise version across CI and local environments (e.g. via mise's self-management)
Example fix
# before: lockfile_version = 4 written by mise 2026.9, running mise 2025.1 # after: upgrade mise, or rewrite lockfile mise lock --downgrade # or: rm mise.lock && mise lock
Defensive patterns
Strategy: fallback
Validate before calling
// Compare lockfile version against the running mise before relying on it
let v: u64 = toml::from_str::<toml::Value>(&txt)?.get("lockfile_version")
.and_then(|v| v.as_integer()).unwrap_or(0) as u64;
let supported: u64 = /* CURRENT_LOCKFILE_VERSION of your mise */ 2;
if v > supported { eprintln!("lockfile v{v} newer than supported v{supported}; upgrade mise"); } Try / catch
match parse_lockfile(txt) {
Err(e) if e.to_string().contains("unsupported lockfile version") => {
// regenerate with the current mise instead of failing hard
regenerate_lockfile()?;
}
other => other?,
} Prevention
- Pin the same mise version in CI and locally
- Before downgrading mise, run `mise lock --downgrade` to rewrite the lockfile
- Check lockfile_version in mise.lock after pulling teammate changes
When it happens
Trigger: Loading a mise.lock whose lockfile_version value is greater than the current binary's CURRENT_LOCKFILE_VERSION — i.e. the lockfile was written by a newer mise than the one reading it. Happens after downgrading mise, or when a teammate/tool with a newer mise regenerated the shared lockfile.
Common situations: Downgrading mise while a newer lockfile is checked in; CI running an older pinned mise than developers use locally; switching branches where one branch was upgraded with a newer mise.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- remote cache capability protocol {} is incompatible with cli
- cannot merge lockfile version {} from {} into lockfile versi
- unsupported dotfile repository format {}
- this setup repository uses format {format}; upgrade mise (th
- unsupported task cache store version {}; expected {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/f6d5c60804288286.
Report an issue: GitHub.