DioxusLabs/dioxus · error · syn::Error
keyword argument repeated: `input_derive`
Error message
keyword argument repeated: `input_derive`
What it means
`input_derive = ...` adds `#[derive(...)]` attributes to the generated input wrapper type for a `#[server]` function; like every keyword here it may be set only once (packages/fullstack-macro/src/lib.rs:1602-1608).
Source
Thrown at packages/fullstack-macro/src/lib.rs:1604
}
fn_path = Some(stream.parse()?);
} else if key == "input" {
if encoding.is_some() {
return Err(syn::Error::new(
key.span(),
"`encoding` and `input` should not both be \
specified",
));
} else if input.is_some() {
return Err(syn::Error::new(
key.span(),
"keyword argument repeated: `input`",
));
}
input = Some(stream.parse()?);
} else if key == "input_derive" {
if input_derive.is_some() {
return Err(syn::Error::new(
key.span(),
"keyword argument repeated: `input_derive`",
));
}
input_derive = Some(stream.parse()?);
} else if key == "output" {
if encoding.is_some() {
return Err(syn::Error::new(
key.span(),
"`encoding` and `output` should not both be \
specified",
));
} else if output.is_some() {
return Err(syn::Error::new(
key.span(),
"keyword argument repeated: `output`",
));
}View on GitHub (pinned to 393d190a80)
Solutions
- Combine all derives into a single `input_derive(Clone, Debug, Deserialize)` list.
- Delete the duplicated `input_derive` entry.
- Check `output_derive` for the same duplication pattern while you are there.
Example fix
// before
#[server(input_derive(Clone), input_derive(Deserialize))]
async fn run(task: Task) { ... }
// after
#[server(input_derive(Clone, Deserialize))]
async fn run(task: Task) { ... } Defensive patterns
Strategy: validation
Validate before calling
# Reuse the duplicate-key checker from index 93; input_derive is in its key list.
Prevention
- Multiple derives belong in one list: input_derive(Clone, Debug, Deserialize).
- Check output_derive at the same time — the same duplication habit applies.
When it happens
Trigger: `#[server(input_derive(Deserialize), input_derive(Clone))]`; adding a second derive while migrating from `encoding` (where derives came bundled) to explicit keys; merge conflicts leaving two `input_derive` entries.
Common situations: Not realizing multiple derives go in ONE `input_derive(...)` list; copy-paste of an example that already had `input_derive`; version upgrades moving derives from `encoding` sugar to the explicit key.
Related errors
- keyword argument repeated: `name`
- keyword argument repeated: `prefix`
- keyword argument repeated: `encoding`
- keyword argument repeated: `endpoint`
- `encoding` and `input` should not both be specified
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/9c411110f864c8e6.
Report an issue: GitHub.