jdx/mise · error
unsupported pkgx package info format
Error message
unsupported pkgx package info format
What it means
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.
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.
Example fix
// before (mise.lock) [pkgx-packages.git] name = "git" # wrong shape // after [pkgx-packages.git] url = "https://pkgx.org/..." checksum = "sha256:..."
Defensive patterns
Strategy: validation
Validate before calling
const pkg = doc.get('pkgx-packages')?.[name];
if (pkg && (typeof pkg !== 'object' || !('url' in pkg))) throw new Error('pkgx package entry must be a table with url'); Type guard
function isPkgxPackageInfo(v) { return typeof v === 'object' && v !== null && typeof v.url === 'string'; } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Editing pkgx package entries by hand; merging lockfiles incorrectly; opening a lockfile produced by a newer mise with an evolved pkgx section format.
Related errors
- additional_artifacts must be an array in lockfile
- invalid lockfile format for tool
- unsupported asset info format
- unsupported conda package info format
- unsupported lockfile format
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/51b1febc5fb77d47.
Report an issue: GitHub.
Appendix: source
Thrown at src/lockfile.rs:1082
.filter_map(|v| v.as_str().map(String::from))
.collect(),
),
_ => None,
};
let pkgx_runtime_env = match t.remove("pkgx_runtime_env") {
Some(toml::Value::Table(table)) => {
Some(string_table_from_toml_value(toml::Value::Table(table))?)
}
_ => None,
};
Ok(PkgxPackageInfo {
url,
checksum,
pkgx_provides,
pkgx_runtime_env,
})
}
_ => bail!("unsupported pkgx package info format"),
}
}
}
fn string_table_from_toml_value(value: toml::Value) -> Result<BTreeMap<String, String>> {
match value {
toml::Value::Table(table) => Ok(table
.into_iter()
.filter_map(|(key, value)| match value {
toml::Value::String(value) => Some((key, value)),
_ => None,
})
.collect()),
_ => Ok(BTreeMap::new()),
}
}
fn toml_table_from_string_map(values: BTreeMap<String, String>) -> toml::Table {View on GitHub (pinned to 533346cc37)