jdx/mise · error

unsupported conda package info format

Error message

unsupported conda package info format

What it means

The `conda-packages` section of mise.lock maps platform -> package basename -> package info, and each package info must be a TOML table with `url` (and optionally `checksum`). If the value at that leaf is not a table of the expected shape, the parser bails because it cannot construct a CondaPackageInfo.

Solutions

  1. Fix the entry in mise.lock to the expected shape: [conda-packages.<platform>.<pkg>] url = "...", checksum = "...".
  2. Delete the malformed conda-packages entry (or section) and re-run `mise lock`.
  3. Upgrade mise if the lockfile was written by a newer version with a different conda format.

Example fix

// before (mise.lock)
[conda-packages.linux-x64.curl]
package = "curl"  # wrong shape

// after
[conda-packages.linux-x64.curl]
url = "https://conda.anaconda.org/.../curl.tar.bz2"
checksum = "sha256:..."
Defensive patterns

Strategy: validation

Validate before calling

const pkg = doc.get('conda-packages')?.[platform]?.[name];
if (pkg && (typeof pkg !== 'object' || !('url' in pkg))) throw new Error('conda package entry must be a table with url');

Type guard

function isCondaPackageInfo(v) { return typeof v === 'object' && v !== null && typeof v.url === 'string'; }

Prevention

When it happens

Trigger: Parsing a mise.lock whose conda-packages entry value is a scalar, array, or a table with an unrecognized variant instead of `{ url = ..., checksum = ... }`.

Common situations: Hand-editing conda package entries; a newer mise writing a redesigned conda-packages format; corrupted or badly merged lockfiles.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/679a95f6912302d0. Report an issue: GitHub.

Appendix: source

Thrown at src/lockfile.rs:1040

impl TryFrom<toml::Value> for CondaPackageInfo {
    type Error = Report;
    fn try_from(value: toml::Value) -> Result<Self> {
        match value {
            toml::Value::Table(mut t) => {
                let url = t
                    .remove("url")
                    .and_then(|v| match v {
                        toml::Value::String(s) => Some(s),
                        _ => None,
                    })
                    .ok_or_else(|| eyre::eyre!("missing url in conda package info"))?;
                let checksum = match t.remove("checksum") {
                    Some(toml::Value::String(s)) => Some(s),
                    _ => None,
                };
                Ok(CondaPackageInfo { url, checksum })
            }
            _ => bail!("unsupported conda package info format"),
        }
    }
}

impl TryFrom<toml::Value> for PkgxPackageInfo {
    type Error = Report;
    fn try_from(value: toml::Value) -> Result<Self> {
        match value {
            toml::Value::Table(mut t) => {
                let url = t
                    .remove("url")
                    .and_then(|v| match v {
                        toml::Value::String(s) => Some(s),
                        _ => None,
                    })
                    .ok_or_else(|| eyre::eyre!("missing url in pkgx package info"))?;
                let checksum = match t.remove("checksum") {
                    Some(toml::Value::String(s)) => Some(s),

View on GitHub (pinned to 533346cc37)