question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

proto3 Working Document

See original GitHub issue

As kicked off by issue 210, here’s what we need for proto3:

  • Forbid optional / required labels
  • First enum value with tag 0 (#575)
    • Default Java enums to that value
    • Forbid null for Java enums
  • Any
    • support in parser (TODO oldergod: update)
    • support in schema
    • code gen and runtime API (requires google/protobuf/any.proto)
    • serialization & deserialization
  • map
    • support in parser
    • support in schema (#578)
    • code gen and runtime API (#596)
    • serialization & deserialization (#596)
  • Timestamp and Duration (#1382)
    • code gen and runtime API (timestamp.proto, duration.proto)
    • serialization & deserialization
  • Packed is default for repeated scalars (#1383)
  • reserved
    • support in parser (#548)
    • support enforcement in schema (#283)
  • stream keyword for RPC response types (#282, #580)
  • No extensions unless it’s a custom option. (#1384)
  • ~No unknown fields~ They got reverted in 3.5.
  • Forbid user-defined default values (#1385)
  • Scalars become non-nullable, but message fields remain nullable. (#1386)
    • Test case: empty string, default enum, 0 int in a repeated field should all be encoded.
    • Test case: map entries that have default values.
  • Support in Java.
    • Crash if we pass a null to a non-nullable type (like int32)
    • Default Java strings to “”
    • Forbid null for Java strings
  • Support in Gson.
  • Tests for Gson and proto3.
  • Tests for Java and proto3.
  • AnyMessage documentation. (@oldergod)
  • Wrappers. (@swankjesse and @oldergod)
    • Runtime.
    • JSON.
  • JSON support.
  • Create a doc to list differences we took in designing our generated code differently from Google. (@oldergod)
  • Proto2 and Proto3 interoperability tests. (@oldergod)
  • Remove proto3 unsupported option. (@oldergod)
  • Forbid usage for proto2 enums in proto3 messages. (@oldergod)

Goal: All done September 1?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:32
  • Comments:40 (12 by maintainers)

github_iconTop GitHub Comments

7reactions
oldergodcommented, Aug 21, 2020

We’re aiming at releasing a RC in 2 weeks.

6reactions
garypcommented, Jan 21, 2020

@sweetbot You might want to check out https://github.com/streem/pbandk (disclaimer: I’m one of the developers). It supports proto3 and generates Kotlin multiplatform code (currently supports Kotlin/JVM and Kotlin/JS; Kotlin/Native is still to do). It’s not as mature as Wire, but we’d love some community contributions! We use it in production and all of the basic protobuf features are supported.

Also, I have the utmost respect for the Wire library and its authors. We probably would have ended up using Wire if proto3 support had been available. I’m only mentioning an alternative here because someone asked. There’s a lot of similarity between the two libraries, but there are also places where we’ve made different design decisions, especially in how to best represent things in Kotlin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Language Guide (proto3) | Protocol Buffers - Google Developers
This guide describes how to use the protocol buffer language to structure your protocol buffer data, including .proto file syntax and how to...
Read more >
Protocol Buffers v3 | Cloud APIs
It supports both binary and text wire formats, and works with many different wire protocols on different platforms. Proto3 is the latest version...
Read more >
How To Implement Field Presence for Proto3 - GitHub
This document is targeted at developers who own or maintain protobuf code generators. All code generators will need to be updated to support...
Read more >
Protocol Buffers - Learn X in Y Minutes
Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and ...
Read more >
Protocol Buffers - Wikipedia
Protocol Buffers (Protobuf) is a free and open-source cross-platform data format used to serialize structured data. It is useful in developing programs to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found