{"record":{"id":"f6d5c60804288286","repo":"jdx/mise","slug":"unsupported-lockfile-version-lockfile-version-t","errorCode":null,"errorMessage":"unsupported lockfile version {lockfile_version}; this mise supports up to version {CURRENT_LOCKFILE_VERSION}","messagePattern":"unsupported lockfile version (.+?); this mise supports up to version (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lockfile.rs","lineNumber":1198,"sourceCode":"        }\n        trace!(\"reading lockfile {}\", path.display_user());\n        // Sidecars belong to the lockfile target, including when only the\n        // lockfile (and not its sidecar files) has been symlinked elsewhere.\n        let target = path\n            .is_symlink()\n            .then(|| fs::canonicalize(path))\n            .transpose()?;\n        let path = target.as_deref().unwrap_or(path);\n        let content = file::read_to_string(path)?;\n        let generated_header_url = existing_lockfile_doc_url(&content);\n        let mut table: toml::Table = toml::from_str(&content)?;\n        let lockfile_version = table\n            .remove(\"lockfile_version\")\n            .map(|value| value.try_into())\n            .transpose()?\n            .unwrap_or(0);\n        if lockfile_version > CURRENT_LOCKFILE_VERSION {\n            bail!(\n                \"unsupported lockfile version {lockfile_version}; this mise supports up to version {CURRENT_LOCKFILE_VERSION}\"\n            );\n        }\n\n        let tools: toml::Table = table\n            .remove(\"tools\")\n            .unwrap_or(toml::Table::new().into())\n            .try_into()?;\n\n        let mut lockfile = Lockfile {\n            lockfile_version,\n            generated_header_url,\n            ..Default::default()\n        };\n\n        for (short, value) in tools {\n            let versions = match value {\n                toml::Value::Array(arr) => arr","sourceCodeStart":1180,"sourceCodeEnd":1216,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/lockfile.rs#L1180-L1216","documentation":"mise.lock starts with `lockfile_version`. If that integer is greater than the CURRENT_LOCKFILE_VERSION compiled into the running mise, the parser refuses to read it, because it cannot safely interpret a future format (fields may be missing, renamed, or reinterpreted).","triggerScenarios":"Running `mise install`/`mise lock`/any lockfile-reading command in a mise binary older than the one that wrote the lockfile (higher lockfile_version), or manually bumping lockfile_version in mise.lock.","commonSituations":"Checking out a project whose lockfile was written by a teammate on a newer mise; using an outdated mise on CI; hand-editing lockfile_version upward.","solutions":["Upgrade mise to the latest release so it supports the lockfile's version.","If upgrading isn't possible, delete mise.lock (or remove the lockfile_version constraint understanding) and re-lock with the current mise via `mise lock`.","Align team/CI mise versions (e.g. pin mise itself via mise.lock bootstrap or CI setup) to avoid version skew."],"exampleFix":"# before: lockfile_version = 3 written by newer mise, local mise supports 2\n\n# after: upgrade mise, or regenerate\n$ mise upgrade mise\n$ mise lock","handlingStrategy":"fallback","validationCode":"const ver = doc.get('lockfile_version') ?? 0;\nif (ver > CURRENT_LOCKFILE_VERSION) throw new Error(`lockfile_version ${ver} exceeds supported ${CURRENT_LOCKFILE_VERSION}; upgrade mise`);","typeGuard":null,"tryCatchPattern":"try {\n  mise('install');\n} catch (e) {\n  if (String(e).includes('unsupported lockfile version')) {\n    upgradeMise(); // e.g. mise self-update or package-manager update\n  } else { throw e; }\n}","preventionTips":["Pin and auto-update mise in CI images.","Upgrade mise before pulling lockfile changes from teammates.","Never manually bump lockfile_version.","Document the mise version requirement in the repo (e.g. mise enrs or README)."],"tags":["lockfile","versioning","compatibility"],"backgroundTag":"value-out-of-range","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}