{"record":{"id":"5dbf232b5d7d1228","repo":"dbt-labs/dbt-core","slug":"name-set-multiple-times","errorCode":null,"errorMessage":"`name` set multiple times.","messagePattern":"`name` set multiple times\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/dbt-runtime-macros/src/entry.rs","lineNumber":118,"sourceCode":"        Configuration {\n            name: None,\n            rt_multi_thread_available: rt_multi_thread,\n            default_flavor: match is_test {\n                true => RuntimeFlavor::CurrentThread,\n                false => RuntimeFlavor::Threaded,\n            },\n            flavor: None,\n            worker_threads: None,\n            start_paused: None,\n            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    }","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-runtime-macros/src/entry.rs#L100-L136","documentation":"A proc-macro (`#[entry]`-style attribute in dbt-runtime-macros) accepts a `name = \"...\"` option at most once. `set_name` errors when the attribute block specifies `name` a second time. This is a compile-time syn::Error attributed to the offending span.","triggerScenarios":"Writing the attribute as `#[entry(name = \"a\", name = \"b\")]` (or repeating `name` across accumulated attribute args) on the annotated item — `build_config` routes each literal to `set_name`, which sees the field already set.","commonSituations":"Merging two copies of an attribute during a refactor or code-gen; copy-pasting an attribute block that already contained `name`; hand-editing generated macro invocations.","solutions":["Remove the duplicate `name = \"...\"` entry, keeping only one.","If both values are meaningful, rename one option or nest them (e.g. separate the runtime name from another identifier).","Regenerate the annotated code if it came from a macro/codegen template that can duplicate options."],"exampleFix":"// before\n#[entry(name = \"alpha\", name = \"beta\")]\n// after\n#[entry(name = \"alpha\")]","handlingStrategy":"validation","validationCode":"// grep CI check: no duplicated options in entry attributes\n// rg -n 'name\\s*=.*name\\s*=' --glob '*.rs' crates/","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep each macro option specified exactly once per attribute","Fix merge conflicts that duplicate attribute lines","Check codegen templates for repeated option emission"],"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"}