Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto: deprecate {Unm,M}arshalMessageSet{JSON} #741

Merged
merged 1 commit into from
Nov 8, 2018
Merged

Commits on Oct 31, 2018

  1. proto: deprecate {Unm,M}arshalMessageSet{JSON}

    Despite the naming, these are "internal-only" functions that are intended to
    only be called from generated code for MessageSets.
    Furthermore, MessageSets are themselves a deprecated feature from proto1 days,
    such that descriptor.proto even warns against their use since the initial
    open-source release of protocol buffers in 2008. Within Google,
    there are no direct usages of these functions, and all existing
    usages of MessageSets go through the new table-driven implementation.
    
    In addition to deprecating the {Unm,M}arshalMessageSet{JSON} top-level functions,
    also modify the generator to stop emitting MarshalJSON and UnmarshalJSON methods
    for messages sets. The UnmarshalJSON method is not implemented and the
    MarshalJSON method does not seem to be called anywhere in Google (verified by
    making the method panic and doing a global test). The jsonpb package continues
    to work with MessageSets.
    
    I should note that when the table-driven implementation was open sourced
    in late 2017 (see 8cc9e46), it accidentally
    removed generation of the Marshal and Unmarshal method. However, no one seemed
    to have noticed that those methods were no longer generated.
    dsnet committed Oct 31, 2018
    Configuration menu
    Copy the full SHA
    3a1a64b View commit details
    Browse the repository at this point in the history