jdx/mise · error

unsupported asset info format

Error message

unsupported asset info format

What it means

The lockfile parser converts the `[install]`-style per-platform asset table of a tool entry into a PlatformInfo struct. The outer value must be a TOML table matching the expected asset-info layout; any other TOML type (or an unrecognized top-level shape) triggers this bail, since the parser cannot interpret the entry as installable asset metadata.

Solutions

  1. Upgrade mise to the version matching the lockfile format.
  2. Delete the affected tool entries from mise.lock and re-run `mise lock` to regenerate them in the current format.
  3. Restore the lockfile from version control.

Example fix

// before (mise.lock)
[tools.uv.platforms.linux-x64]
install = "uv-binary"  # corrupted/scalar shape

// after: remove the entry and regenerate
# mise lock
Defensive patterns

Strategy: validation

Validate before calling

const entry = doc.get('tools')?.flatMap(t => t.get('platforms'));
const bad = entry?.filter(e => typeof e.value !== 'object' || Array.isArray(e.value));
if (bad?.length) throw new Error('platform asset entries must be tables');

Type guard

function isTable(v) { return typeof v === 'object' && v !== null && !Array.isArray(v); }

Prevention

When it happens

Trigger: Parsing a mise.lock tool platform entry whose value is not a table with the expected keys (e.g. a bare string, integer, or array) — produced by a newer mise format, corruption, or hand editing.

Common situations: Lockfiles written by future mise versions with a redesigned platform-info format; manual edits that replaced a table with a scalar; truncated or merge-damaged lockfiles.

Related errors


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

Appendix: source

Thrown at src/lockfile.rs:891

                Ok(PlatformInfo {
                    install,
                    checksum,
                    size,
                    url,
                    url_api,
                    conda_deps,
                    pkgx_deps,
                    pkgx_provides,
                    pkgx_runtime_env,
                    provenance,
                    provenance_verified,
                    github_attestations,
                    signer,
                    attested_by,
                    additional_artifacts,
                })
            }
            _ => bail!("unsupported asset info format"),
        }
    }
}

impl From<PlatformInfo> for toml::Value {
    fn from(platform_info: PlatformInfo) -> Self {
        let mut table = toml::Table::new();
        if let Some(install) = platform_info.install {
            table.insert("install".to_string(), install.into());
        }
        if let Some(checksum) = platform_info.checksum {
            table.insert("checksum".to_string(), checksum.into());
        }
        if let Some(url) = platform_info.url {
            table.insert("url".to_string(), url.into());
        }
        if let Some(url_api) = platform_info.url_api {
            table.insert("url_api".to_string(), url_api.into());

View on GitHub (pinned to 533346cc37)