{"record":{"id":"88deddd2c17cb766","repo":"jdx/mise","slug":"expected-mapped-task-tool-for-tool","errorCode":null,"errorMessage":"expected mapped task tool for {tool}","messagePattern":"expected mapped task tool for (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/mod.rs","lineNumber":5898,"sourceCode":"        let parsed: TaskTools = toml::from_str(\n            r#\"\n            [tools]\n            node = { version = \"20\", backend_options = { nested = [1, true] } }\n            go = { prefix = \"1.22\" }\n            python = { ref = \"main\" }\n            shellcheck = { path = \"/opt/shellcheck\" }\n            \"#,\n        )\n        .unwrap();\n\n        for (tool, expected) in [\n            (\"node\", \"20\"),\n            (\"go\", \"prefix:1.22\"),\n            (\"python\", \"ref:main\"),\n            (\"shellcheck\", \"path:/opt/shellcheck\"),\n        ] {\n            let TaskToolValue::Map(value) = &parsed.tools[tool] else {\n                panic!(\"expected mapped task tool for {tool}\");\n            };\n            assert_eq!(value.version, expected);\n        }\n\n        let TaskToolValue::Map(node) = &parsed.tools[\"node\"] else {\n            panic!(\"expected mapped node task tool\");\n        };\n        assert_eq!(\n            node.opts[\"backend_options\"][\"nested\"].as_array(),\n            Some(&vec![toml::Value::Integer(1), toml::Value::Boolean(true)])\n        );\n\n        for (invalid, expected) in [\n            (\n                \"[tools]\\nnode = { version = \\\"20\\\", prefix = \\\"20\\\" }\\n\",\n                \"tool definition cannot specify both `version` and `prefix`\",\n            ),\n            (","sourceCodeStart":5880,"sourceCodeEnd":5916,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/task/mod.rs#L5880-L5916","documentation":"Let-else panic in a task TOML deserialization unit test: parsed.tools[tool] was not a TaskToolValue::Map for one of node/go/python/shellcheck, meaning the TaskTools deserializer did not map an inline table (with version, prefix, ref, path, or backend_options) into the Map variant. Fires when the custom TOML parsing for [tools] entries regresses.","triggerScenarios":"Thrown at src/task/mod.rs:5898 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the TaskTools Deserialize impl so inline tables become TaskToolValue::Map with the correct version string","Check the prefix:/ref:/path: composition logic matches the expected strings in the test table","Rerun the task TOML parsing tests"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}