{"record":{"id":"51b1febc5fb77d47","repo":"jdx/mise","slug":"unsupported-pkgx-package-info-format","errorCode":null,"errorMessage":"unsupported pkgx package info format","messagePattern":"unsupported pkgx package info format","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lockfile.rs","lineNumber":827,"sourceCode":"                            .filter_map(|v| v.as_str().map(String::from))\n                            .collect(),\n                    ),\n                    _ => None,\n                };\n                let pkgx_runtime_env = match t.remove(\"pkgx_runtime_env\") {\n                    Some(toml::Value::Table(table)) => {\n                        Some(string_table_from_toml_value(toml::Value::Table(table))?)\n                    }\n                    _ => None,\n                };\n                Ok(PkgxPackageInfo {\n                    url,\n                    checksum,\n                    pkgx_provides,\n                    pkgx_runtime_env,\n                })\n            }\n            _ => bail!(\"unsupported pkgx package info format\"),\n        }\n    }\n}\n\nfn string_table_from_toml_value(value: toml::Value) -> Result<BTreeMap<String, String>> {\n    match value {\n        toml::Value::Table(table) => Ok(table\n            .into_iter()\n            .filter_map(|(key, value)| match value {\n                toml::Value::String(value) => Some((key, value)),\n                _ => None,\n            })\n            .collect()),\n        _ => Ok(BTreeMap::new()),\n    }\n}\n\nfn toml_table_from_string_map(values: BTreeMap<String, String>) -> toml::Table {","sourceCodeStart":809,"sourceCodeEnd":845,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/lockfile.rs#L809-L845","documentation":"Each entry under mise.lock's pkgx section must be a table with a string url (required), optional checksum, pkgx_provides (string table), and pkgx_runtime_env (string table); any non-table value bails with \"unsupported pkgx package info format\" (src/lockfile.rs:789-828).","triggerScenarios":"A pkgx package entry that is a bare string, integer, or array instead of a table — hand edits, or a lockfile written by a mise version with a different pkgx section shape.","commonSituations":"Hand-editing mise.lock pkgx entries; format drift after upgrading/downgrading mise.","solutions":["Regenerate the lockfile: rm mise.lock && mise lock.","Align mise versions across machines/CI.","Do not hand-edit mise.lock."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# CI guard: pkgx entries must be tables with a string url\npython3 -c \"\nimport tomllib\nd = tomllib.load(open('mise.lock', 'rb'))\nfor k, v in d.items():\n    if 'pkgx' in k and isinstance(v, dict):\n        for name, info in v.items():\n            if not isinstance(info, dict) or not isinstance(info.get('url'), str):\n                raise SystemExit('bad pkgx package info: %s' % name)\n\"","typeGuard":null,"tryCatchPattern":"On \"unsupported pkgx package info format\", delete and regenerate mise.lock with an aligned mise version; do not hand-convert the entry, and surface the version-skew hint in job output.","preventionTips":["Regenerate lockfiles after mise upgrades.","Never hand-edit pkgx sections.","Add a lockfile structure check to CI before the install step."],"tags":["lockfile","parse","pkgx","toml","type-error"],"backgroundTag":"invalid-lockfile-format","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}