{"record":{"id":"f5d9d00384dd7a51","repo":"jdx/mise","slug":"backend-does-not-support-version-order","errorCode":null,"errorMessage":"{} backend does not support version_order","messagePattern":"(.+?) backend does not support version_order","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/mod.rs","lineNumber":4191,"sourceCode":"    /// (`1.0.0-rc1`, `1.0.0-dev.5`, ...). Callers that have opted into\n    /// pre-releases pass `false` to keep those tags in the match set.\n    fn fuzzy_match_filter(\n        &self,\n        versions: Vec<String>,\n        query: &str,\n        filter_prereleases: bool,\n    ) -> Vec<String> {\n        fuzzy_match_versions(versions, query, filter_prereleases)\n    }\n\n    /// Select the ordering policy supported by this backend.\n    ///\n    /// Backends must opt in explicitly before `version_order` can affect remote\n    /// version listing or resolution. This keeps opaque version schemes\n    /// source-ordered by default.\n    fn version_order(&self, opts: &ToolVersionOptions) -> eyre::Result<VersionOrder> {\n        if opts.opts.contains_key(\"version_order\") {\n            bail!(\"{} backend does not support version_order\", self.get_type())\n        }\n        Ok(VersionOrder::Source)\n    }\n\n    /// The key of the remote-version cache entry these listing options select.\n    async fn remote_version_cache_context_for(\n        &self,\n        config: &Arc<Config>,\n        listing_opts: &ToolVersionOptions,\n        has_local_version_listing_override: bool,\n    ) -> eyre::Result<Option<String>> {\n        // The listing-relevant options shape the cached list, so they belong in its key.\n        // Only local overrides count: a registry-supplied value is identical for everyone, so\n        // one entry is correct for it, and leaving it out keeps the shared versions host\n        // available for the default case.\n        let opt_context = has_local_version_listing_override.then(|| {\n            listing_option_digest(listing_opts, self.remote_version_listing_tool_option_keys())\n        });","sourceCodeStart":4173,"sourceCodeEnd":4209,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/mod.rs#L4173-L4209","documentation":"The default Backend::version_order implementation rejects any request that sets a `version_order` tool option, because only backends that explicitly opt in support reordering of remote versions. This keeps tools with opaque (non-semver) version schemes source-ordered by default. It throws when the user sets version_order for a backend that has not overridden this method.","triggerScenarios":"Setting `version_order = \"semver\"` (or any value) in tool options (mise.toml tool config or MISE_ env) for a tool whose Backend does not override version_order; calling version_order() with ToolVersionOptions containing the \"version_order\" key on a non-opted-in backend.","commonSituations":"A developer adds `[tools] \"npm:foo\" = { version = \"latest\", version_order = \"semver\" }` to mise.toml but the npm backend has not enabled version_order support; copying a version_order option from one tool's config to another that doesn't support it.","solutions":["Remove the `version_order` option from the tool's config for this backend.","Check whether the backend has opted into version_order support (overrides fn version_order); only set the option for backends that do.","If you maintain a backend and want semver ordering, override version_order in your Backend impl instead of relying on the default."],"exampleFix":"// before (mise.toml)\n[tools]\n\"npm:somepkg\" = { version = \"latest\", version_order = \"semver\" }\n\n// after\n[tools]\n\"npm:somepkg\" = \"latest\"","handlingStrategy":"validation","validationCode":"// shell: before committing config\nmise config get ./mise.toml | grep version_order  # ensure only set for backends that support it\ngrep -rn 'fn version_order' src/backend/ | grep -v 'mod.rs'  # list opted-in backends","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set version_order on backends that explicitly support it","Keep tool options minimal; add options only when needed","Test config changes with `mise ls-remote <tool>` before relying on ordering"],"tags":["backend","version-order","config","unsupported-option"],"backgroundTag":"unsupported-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}