{"record":{"id":"40793be7bcae7642","repo":"dbt-labs/dbt-core","slug":"flavor-set-multiple-times","errorCode":null,"errorMessage":"`flavor` set multiple times.","messagePattern":"`flavor` set multiple times\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/dbt-runtime-macros/src/entry.rs","lineNumber":128,"sourceCode":"            is_test,\n            crate_name: None,\n            unhandled_panic: None,\n        }\n    }\n\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.\",","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-runtime-macros/src/entry.rs#L110-L146","documentation":"The same proc-macro also accepts a `flavor = \"...\"` option at most once. `set_flavor` errors when `flavor` appears twice in the attribute configuration, again as a compile-time syn::Error at the duplicate span. After the uniqueness check, the literal is also validated as a valid RuntimeFlavor.","triggerScenarios":"`#[entry(flavor = \"x\", flavor = \"y\")]` or `flavor` repeated across merged attribute arguments — `build_config` calls `set_flavor` for each and the second call finds `self.flavor.is_some()`.","commonSituations":"Copy-pasted or template-generated attribute blocks; combining two attribute lines that each specify `flavor`; merge conflicts that duplicated the option.","solutions":["Keep exactly one `flavor = \"...\"` option and delete the duplicate.","If multiple flavors are intended, they belong in separate annotated items, not in one attribute.","Check codegen/templates that emit the attribute for duplicated option emission."],"exampleFix":"// before\n#[entry(flavor = \"core\", flavor = \"fusion\")]\n// after\n#[entry(flavor = \"fusion\")]","handlingStrategy":"validation","validationCode":"// grep CI check: no duplicated flavor option\n// rg -n 'flavor\\s*=.*flavor\\s*=' --glob '*.rs' crates/","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Specify flavor at most once per #[entry] attribute","Keep attribute blocks in a canonical, templated form to avoid duplication","Resolve merge conflicts by keeping one flavor line"],"tags":["proc-macro","compile-time","duplicate-argument","rust"],"backgroundTag":"conflicting-config-options","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"}