Switch branches/tags
Commits on Nov 8, 2018
  1. proto: deprecate {Unm,M}arshalMessageSet{JSON} (#741)

    dsnet committed Nov 8, 2018
    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.
Commits on Nov 5, 2018