Skip to content

deprecated as a message-level option / annotation #1734

@licarth

Description

@licarth

There is currently no way of marking a whole message as deprecated.

My current workaround of doing this is to deprecate all fields.

message MyMessage {
    uint32 id = 1 [deprecated=true];
    string name = 2 [deprecated=true];
}

... but it does not exactly mean the same thing, right ?

It would be great to be able to either mark the message with an option (does that even exist ?)

message MyMessage [deprecated=true] {
    uint32 id = 1;
    string name = 2;
}

or an annotation ?

@deprecated
message MyMessage {
    uint32 id = 1;
    string name = 2;
}

The other nice thing about deprecating the message itself would be that one would not need to find all its usages as field and mark all of them as deprecated fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions