jdx/mise · error
this setup repository uses format
Error message
this setup repository uses format {format}; upgrade mise (this version supports format {FORMAT}) What it means
`RepoState::check` fails when the setup repository's on-disk format marker does not equal the format version this build of mise supports. The repository was written by a newer (or incompatible) mise version; this version refuses to touch it rather than corrupting data.
Solutions
- Upgrade mise to a version that supports the repository's format.
- If downgrading intentionally, restore a backup of the setup repository from before the format upgrade.
- Create a fresh setup store with the older mise (losing sync state) only if the history is disposable.
Example fix
// before mise --version # mise 2025.1.0, repo format 3 // after mise self-update # install a mise that supports the repo's format
Defensive patterns
Strategy: fallback
Validate before calling
const state = await sync.readRepoState(repoPath);
if (state.format !== SUPPORTED_FORMAT) {
throw new Error(`mise upgrade required: repo format ${state.format}`);
} Type guard
function isSupportedFormat(state: { kind: string; format?: string }): boolean {
return state.kind !== "marked" || state.format === SUPPORTED_FORMAT;
} Try / catch
try {
await sync.open(repoPath);
} catch (e) {
if (/uses format .* upgrade mise/.test(String(e))) {
await upgradeMise(); // then retry
} else throw e;
} Prevention
- Keep mise versions consistent across machines sharing a setup store.
- Back up the setup repo before running a version that may migrate its format.
- Check release notes for format migrations before downgrading.
When it happens
Trigger: Opening a setup/history sync repo created or migrated by a mise version whose `FORMAT` differs from the current binary's `FORMAT`.
Common situations: Downgrading mise after a format migration; using an old mise on a machine where a newer version already upgraded the setup store; switching between release channels.
Related errors
- mise version is required, but you are using
- brew bottles are only published for a formula's current…
- brew-cask: refusing to remove generic artifact outside
- brew casks are installed at their current version
- cached rustc output directory has unsupported entries
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3a933fbbe23b55d1.
Report an issue: GitHub.
Appendix: 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 533346cc37)