{"record":{"id":"0086caa7c0868f33","repo":"dbt-labs/dbt-core","slug":"no-such-runtime-flavor-s-the-runtime-flavors","errorCode":null,"errorMessage":"No such runtime flavor `{s}`. The runtime flavors are `current_thread`, `local`, and `multi_thread`.","messagePattern":"No such runtime flavor `(.+?)`\\. The runtime flavors are `current_thread`, `local`, and `multi_thread`\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/dbt-runtime-macros/src/entry.rs","lineNumber":133,"sourceCode":"\n    fn set_name(&mut self, name: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.name.is_some() {\n            return Err(syn::Error::new(span, \"`name` set multiple times.\"));\n        }\n\n        let runtime_name = parse_string(name, span, \"name\")?;\n        self.name = Some(runtime_name);\n        Ok(())\n    }\n\n    fn set_flavor(&mut self, runtime: syn::Lit, span: Span) -> Result<(), syn::Error> {\n        if self.flavor.is_some() {\n            return Err(syn::Error::new(span, \"`flavor` set multiple times.\"));\n        }\n\n        let runtime_str = parse_string(runtime, span, \"flavor\")?;\n        let runtime =\n            RuntimeFlavor::from_str(&runtime_str).map_err(|err| syn::Error::new(span, err))?;\n        self.flavor = Some(runtime);\n        Ok(())\n    }\n\n    fn set_worker_threads(\n        &mut self,\n        worker_threads: syn::Lit,\n        span: Span,\n    ) -> Result<(), syn::Error> {\n        if self.worker_threads.is_some() {\n            return Err(syn::Error::new(\n                span,\n                \"`worker_threads` set multiple times.\",\n            ));\n        }\n\n        let worker_threads = parse_int(worker_threads, span, \"worker_threads\")?;\n        if worker_threads == 0 {","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-runtime-macros/src/entry.rs#L115-L151","documentation":"This is a compile-time error from the proc-macro behind #[tokio::main]/#[tokio::test]. The `flavor` attribute value you passed is parsed into a RuntimeFlavor enum via from_str; any string other than `current_thread`, `local`, or `multi_thread` fails and the parse error message is surfaced as a syn::Error at that attribute position. The macro refuses to generate code for an unknown runtime flavor rather than guessing.","triggerScenarios":"Calling #[tokio::main(flavor = \"...\")] (or #[tokio::test(flavor = \"...\")]) with a literal string that RuntimeFlavor::from_str does not recognize — e.g. a typo like `multi-thread`, `single_thread`, `threaded`, or a quoted-but-misspelled name. Raised in set_flavor during build_config of the attribute.","commonSituations":"Typo in flavor name when switching runtime flavors; copying examples from old blog posts using `single_thread`; confusing hyphen/underscore spelling; IDE autocomplete inserting the wrong identifier.","solutions":["Use exactly one of `current_thread`, `local`, or `multi_thread` as the flavor value","Fix hyphen vs underscore: it is `multi_thread`, not `multi-thread`","Remove the flavor attribute entirely to use the default (multi_thread when the rt-multi-thread feature is enabled)"],"exampleFix":"// before\n#[tokio::main(flavor = \"multi-thread\")]\nasync fn main() {}\n\n// after\n#[tokio::main(flavor = \"multi_thread\")]\nasync fn main() {}","handlingStrategy":"validation","validationCode":"const RUNTIME_FLAVORS: [&str; 3] = [\"current_thread\", \"local\", \"multi_thread\"];\nfn check_flavor(attr_flavor: &str) -> Result<(), String> {\n    if RUNTIME_FLAVORS.contains(&attr_flavor) {\n        Ok(())\n    } else {\n        Err(format!(\"invalid flavor `{attr_flavor}`; use one of {RUNTIME_FLAVORS:?}\"))\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy flavor names only from tokio docs; they are snake_case (multi_thread, not multi-thread)","Let rust-analyzer autocomplete the attribute value rather than typing it","Prefer omitting `flavor` unless you specifically need current_thread"],"tags":["rust","proc-macro","tokio","compile-time"],"backgroundTag":"invalid-enum-value","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}