Skip to content

Feedback when a ParamsKey is deprecated #212

@azriel91

Description

@azriel91

The ParamsKey trait could also have a function to indicate whether each variant is deprecated or not. So that when deserializing a params file, the user can be warned about using deprecated parameters.

fn is_deprecated(self) -> bool {
    match self {
        FlowParamsKey::SomeOldParam => Err(Deprecated { hint: "Use new_param instead".to_string(), }),
        _ => Ok(()),
    }
}

This helps to inform the user to remove unnecessary params keys, and maybe migrate them.

Maybe need to think about this alongside ParamsSpecs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions