{"record":{"id":"1bc454ef8e905984","repo":"jdx/mise","slug":"package-type-cargo-is-not-supported-in-the-aqua","errorCode":null,"errorMessage":"package type `cargo` is not supported in the aqua backend. Use the cargo backend instead{}.","messagePattern":"package type `cargo` is not supported in the aqua backend\\. Use the cargo backend instead(.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":5140,"sourceCode":"\nfn validate(pkg: &AquaPackage, version: &str) -> Result<()> {\n    if pkg.no_asset.unwrap_or(false) {\n        bail!(\"no asset released\");\n    }\n    if let Some(message) = &pkg.error_message {\n        bail!(\"{}\", message);\n    }\n    if !is_platform_supported(&pkg.supported_envs, os(), arch()) {\n        bail!(\n            \"unsupported env: {}/{} (supported: {:?})\",\n            os(),\n            arch(),\n            pkg.supported_envs\n        );\n    }\n    match pkg.package_type() {\n        AquaPackageType::Cargo => {\n            bail!(\n                \"package type `cargo` is not supported in the aqua backend. Use the cargo backend instead{}.\",\n                pkg.crate_name\n                    .as_deref()\n                    .filter(|name| !name.is_empty())\n                    .or_else(|| {\n                        pkg.name\n                            .as_deref()\n                            .and_then(|s| s.strip_prefix(\"crates.io/\"))\n                    })\n                    .map(|name| format!(\": cargo:{}\", name.escape_debug()))\n                    .unwrap_or_default()\n            )\n        }\n        AquaPackageType::GoInstall => {\n            let backend = go_install_backend(pkg, version)?;\n            bail!(\n                \"package type `go_install` is not supported in the aqua backend. Use the go backend instead: {backend}.\"\n            )","sourceCodeStart":5122,"sourceCodeEnd":5158,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/aqua.rs#L5122-L5158","documentation":"Aqua registry entries can declare `type: cargo` (packages to install via crates.io). The aqua backend only fetches prebuilt GitHub/release assets, so cargo-typed packages are rejected and the user is directed to mise's dedicated cargo backend. When the registry entry names a crate (via crate_name or the package name), it appends the exact `cargo:<crate>` backend string to use.","triggerScenarios":"Installing `aqua:<pkg>` where the aqua registry entry's package type is `cargo` — typically when a mise.toml references an aqua shorthand for a Rust CLI.","commonSituations":"Copying tool configs that used aqua for a Rust tool; the aqua registry migrating entries from github-release to cargo type; users assuming aqua covers all registry-listed tools.","solutions":["Use the suggested backend from the message: `mise use cargo:<crate-name>`","Update mise.toml to replace `aqua:<name>` with `cargo:<crate>`","If you need the prebuilt binary instead, install the tool via the github backend for its releases"],"exampleFix":"// before (mise.toml)\n[tools]\n\"aqua:ripgrep\" = \"latest\"\n\n// after\n[tools]\nripgrep = { version = \"latest\", backend = \"cargo:ripgrep\" }\n// or simply: \"cargo:ripgrep\" = \"latest\"","handlingStrategy":"fallback","validationCode":"// resolve the aqua registry entry type before adding to mise.toml\nconst entry = await registry.lookup(name);\nif (entry.type === 'cargo') console.warn(`Use the cargo backend instead: mise use cargo:${entry.crate_name ?? name}`);","typeGuard":null,"tryCatchPattern":"catch (e) {\n  if (e.message.includes('Use the cargo backend instead')) {\n    const crate = e.message.match(/cargo:([^\\\"]+)/)?.[1];\n    console.error(`Rewrite to ${crate ? `cargo:${crate}` : 'the cargo backend'}.`);\n  }\n}","preventionTips":["Prefer mise's native backend shorthands (cargo:, go:, npm:) over aqua for non-release-asset tools","Check the aqua registry entry's `type` field when migrating configs from aqua to mise","Ensure Rust toolchain availability when using cargo: backends"],"tags":["aqua","cargo","backend-mismatch"],"backgroundTag":"incompatible-source-type","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"}