{"record":{"id":"7690951c19f9e054","repo":"jdx/mise","slug":"lazy-tool-has-no-registry-bin-metadata-set-laz","errorCode":null,"errorMessage":"lazy tool {} has no registry bin metadata; set lazy_bins explicitly","messagePattern":"lazy tool (.+?) has no registry bin metadata; set lazy_bins explicitly","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/toolset/tool_request.rs","lineNumber":310,"sourceCode":"\n    /// Command names that should receive bootstrap shims before a lazy tool is installed.\n    /// Registry metadata is authoritative when the config does not provide an explicit list.\n    pub(crate) fn lazy_bins(&self) -> Result<Option<Vec<String>>> {\n        let options = self.resolved_options().effective();\n        if options.lazy != Some(true) {\n            return Ok(None);\n        }\n        if !options.lazy_bins.is_empty() {\n            return Ok(Some(options.lazy_bins.clone()));\n        }\n        if let Some(tool) = self.ba().registry_tool()\n            && !tool.bins.is_empty()\n        {\n            return Ok(Some(\n                tool.bins.iter().map(|bin| (*bin).to_string()).collect(),\n            ));\n        }\n        bail!(\n            \"lazy tool {} has no registry bin metadata; set lazy_bins explicitly\",\n            self.ba().short\n        )\n    }\n\n    pub(crate) fn explicit_options(&self) -> ToolVersionOptions {\n        self.resolved_options().options_from_sources(&[\n            ToolOptionSource::Request,\n            ToolOptionSource::InlineBackendArg,\n        ])\n    }\n\n    fn resolved_options(&self) -> &ResolvedToolOptions {\n        match self {\n            Self::Version { options: o, .. }\n            | Self::Prefix { options: o, .. }\n            | Self::Ref { options: o, .. }\n            | Self::Sub { options: o, .. }","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/toolset/tool_request.rs#L292-L328","documentation":"When a tool request is marked lazy, mise needs the tool's executable bin names to create lazy shims. It tries registry bin metadata first; if the registry has no bins for the tool and lazy_bins wasn't set explicitly, mise cannot know what to shim and bails.","triggerScenarios":"Calling ToolRequest::lazy_bins for a lazy tool where the registry entry has empty bins and no explicit lazy_bins were provided — i.e. a registry/short entry lacking 'bins' metadata while lazy shims are enabled.","commonSituations":"Custom or newly-added registry tools missing bins metadata in mise.plugin.toml/registry; enabling lazy shims for a tool the registry doesn't describe; a plugin without declared bins.","solutions":["Set lazy_bins explicitly for the tool (e.g. in the tool's config/registry entry) listing its executables","Add `bins` metadata to the tool's registry entry","Disable lazy shims for that tool if bin names are unknown","Update the plugin/registry entry so it declares its bins"],"exampleFix":"// before (registry entry without bins)\n[tools.mytool]\nbackend = 'github:me/mytool'\n// after\n[tools.mytool]\nbackend = 'github:me/mytool'\nbins = ['mytool']","handlingStrategy":"validation","validationCode":"// ensure registry metadata declares bins before enabling lazy shims\nif (!registryEntry.bins || registryEntry.bins.length === 0) config.lazy_bins = explicitBins;","typeGuard":"const hasBins = (t) => Array.isArray(t.bins) && t.bins.length > 0;","tryCatchPattern":"try { lazyBins(req) } catch (e) { if (String(e).includes('no registry bin metadata')) { fallbackToNonLazyInstall(req); } else { throw e; } }","preventionTips":["Add bins metadata to any custom registry/plugin entries","Set lazy_bins explicitly when bins metadata is unavailable","Only enable lazy shims for tools with known executable names","Test custom tools in a non-lazy mode first"],"tags":["lazy-shims","registry","metadata"],"backgroundTag":"missing-required-config-field","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}