Skip to content

PSA: the generated clone() and copyWith() methods are deprecated #998

@devoncarew

Description

@devoncarew

As a general PSA, the generated MyMessage.clone() and MyMessage.copyWith(Function updates) methods are deprecated. These methods can add significant overhead to your binary; we plan to remove in a future major version release of this package.

Instead of MyMessage.clone(), call GeneratedMessageGenericExtensions.deepCopy().

Instead of MyMessage.copyWith(), call GeneratedMessageGenericExtensions.rebuild().

We'll link to this issue from the generated source.

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