{"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":1082,"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":1064,"sourceCodeEnd":1100,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/lockfile.rs#L1064-L1100","documentation":"The `pkgx-packages` section of mise.lock expects each package entry to be a TOML table convertible into PkgxPackageInfo (url, checksum, pkgx_provides, pkgx_runtime_env). Any other TOML type or unrecognized table variant makes the parser bail rather than guess.","triggerScenarios":"Parsing a mise.lock pkgx-packages entry whose value is not a table with the expected keys — due to manual edits, corruption, or a format written by a newer mise.","commonSituations":"Editing pkgx package entries by hand; merging lockfiles incorrectly; opening a lockfile produced by a newer mise with an evolved pkgx section format.","solutions":["Correct the entry to the expected table shape (url/checksum/pkgx_provides/pkgx_runtime_env keys).","Remove the malformed pkgx-packages entry and regenerate with `mise lock`.","Upgrade mise if the lockfile came from a newer version."],"exampleFix":"// before (mise.lock)\n[pkgx-packages.git]\nname = \"git\"  # wrong shape\n\n// after\n[pkgx-packages.git]\nurl = \"https://pkgx.org/...\"\nchecksum = \"sha256:...\"","handlingStrategy":"validation","validationCode":"const pkg = doc.get('pkgx-packages')?.[name];\nif (pkg && (typeof pkg !== 'object' || !('url' in pkg))) throw new Error('pkgx package entry must be a table with url');","typeGuard":"function isPkgxPackageInfo(v) { return typeof v === 'object' && v !== null && typeof v.url === 'string'; }","tryCatchPattern":null,"preventionTips":["Don't hand-edit pkgx-packages; use `mise lock` to regenerate.","Keep mise versions consistent across the team.","Review lockfile diffs in PRs to catch structural corruption."],"tags":["lockfile","parsing","pkgx","toml"],"backgroundTag":"unsupported-config-value","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"}