jdx/mise · error

this setup repository uses format {format}; upgrade mise (th

Error message

this setup repository uses format {format}; upgrade mise (this version supports format {FORMAT})

What it means

RepoState::check fails when a setup/history repository was written by a newer (or different) mise whose on-disk format version differs from the FORMAT constant compiled into the running binary. The repo refuses to touch the store rather than misinterpret it, and tells the user to upgrade mise.

Source

Thrown at src/system/history/sync/format.rs:49

/// What the fetched setup branch is.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) enum RepoState {
    /// No branch yet: the first publication creates it with the marker.
    Empty,
    /// A history-enabled repository of the given format.
    Marked(u32),
    /// An existing, non-empty repository without the marker: adopted only
    /// after a deliberate confirmation.
    Unmarked,
}

impl RepoState {
    /// Fails for a format this mise does not understand.
    pub(crate) fn check(&self) -> Result<()> {
        if let Self::Marked(format) = self
            && *format != FORMAT
        {
            bail!(
                "this setup repository uses format {format}; upgrade mise (this version supports format {FORMAT})"
            );
        }
        Ok(())
    }
}

pub(crate) fn detect(repo: &HistoryRepo, upstream: Option<&str>) -> Result<RepoState> {
    let Some(commit) = upstream else {
        return Ok(RepoState::Empty);
    };
    match repo.object_at(commit, MARKER_PATH)? {
        Some((_, oid)) => Ok(RepoState::Marked(parse_marker(
            &repo.cat_object_bounded(&oid, 64 * 1024)?,
        )?)),
        None => Ok(RepoState::Unmarked),
    }
}

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Upgrade mise to the version that supports the store's format (mise self-update or your package manager).
  2. Check the store's format marker and the supported format in mise's release notes before downgrading.
  3. Clone/fresh-init a setup store if you must stay on the old mise version.

Example fix

# before
$ mise --version
mise 2026.1.2  # store marked format 3
# after
$ mise self-update
$ mise --version
mise 2026.9.0
Defensive patterns

Strategy: retry

Validate before calling

if let RepoState::Marked(format) = repo_state {
    if format != FORMAT {
        eprintln!("store format {format} > supported {FORMAT}; upgrade mise");
    }
}

Try / catch

match repo_state.check() {
    Ok(()) => sync(),
    Err(e) if e.to_string().contains("upgrade mise") => {
        upgrade_mise()?;
        retry_sync()
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Reading or syncing a setup store whose Marked(format) != FORMAT — i.e. the store was created/upgraded by a newer mise release than the one in use.

Common situations: Switching machines or shells with an outdated mise binary while the store was migrated by a newer version; pinning mise to an old version while dotfiles sync auto-upgrades the store format; rollback after a format-bumping release.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/3a933fbbe23b55d1. Report an issue: GitHub.