{"record":{"id":"07844ce361e0b7d9","repo":"swc-project/swc","slug":"option-targets","errorCode":null,"errorMessage":"Option<Targets>: {:?}","messagePattern":"Option<Targets>: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/preset_env_base/src/query.rs","lineNumber":213,"sourceCode":"            for (k, v) in map.iter() {\n                match v {\n                    QueryOrVersion::Query(q) => {\n                        let (versions, is_unknown) = q.exec().context(\"failed to run query\")?;\n                        unknown_version = unknown_version || is_unknown;\n\n                        for (k, v) in versions.iter() {\n                            result.insert(k, *v);\n                        }\n                    }\n                    QueryOrVersion::Version(v) => {\n                        result.insert(k, Some(*v));\n                    }\n                }\n            }\n\n            unimplemented!(\"Targets: {:?}\", map)\n        }\n        _ => unimplemented!(\"Option<Targets>: {:?}\", v),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::Query;\n\n    #[test]\n    fn test_empty() {\n        let (res, unknown_version) = Query::Single(\"\".into()).exec().unwrap();\n        assert!(\n            !res.is_any_target(),\n            \"empty query should return non-empty result\"\n        );\n        assert!(\n            !unknown_version,\n            \"empty query should not be unknown version\"\n        );","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/preset_env_base/src/query.rs#L195-L231","documentation":"A todo!() in targets_to_versions (preset_env_base query.rs:213), companion to the Targets todo at line 211. It fires at the final step where the accumulated version map is converted to Option<Targets>; the conversion path is not finished, so any execution reaching it aborts with the debug dump of the Option<Targets> value being produced. It marks an unfinished branch of the query-to-versions pipeline.","triggerScenarios":"Thrown at crates/preset_env_base/src/query.rs:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Finish the Option<Targets> conversion branch in targets_to_versions","Route around the unfinished branch by supplying explicit version targets instead of browserlist queries","Report the configuration that reaches this path so it can be supported upstream"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}