Skip to main content

detect_conflicting_duplicate_params

Function detect_conflicting_duplicate_params 

Source
pub fn detect_conflicting_duplicate_params(
    args: &[String],
) -> Result<(), String>
Expand description

Reject a key=value run param supplied more than once with conflicting values. These params collapse into a map (last value wins — see parse_params), which silently discards an earlier value: e.g. scenario=reset scenario=idx_sweep drops reset and runs idx_sweep. A repeat with an IDENTICAL value is harmless and allowed (re-passing the same value shouldn’t break a script); a conflicting repeat is an ambiguous instruction, so it’s rejected and surfaced rather than silently last-wins (“Never Ignore Silently”).

Mirrors parse_params’s arg walk: session-dir flags (own resolver) and dotted phase-scoped overrides (<phase>.<param>=, a separate namespace) are skipped, and the same quote elision is applied so scenario=x and scenario='x' compare equal.