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

Initial draft for changelog. #1515

Merged
merged 3 commits into from
May 11, 2016
Merged

Conversation

liujisi
Copy link
Contributor

@liujisi liujisi commented May 11, 2016

I have left some TODOs for people who are working on this to add more details. @haberman @anandolee @nmittler @jskeet @danielweis

@liujisi
Copy link
Contributor Author

liujisi commented May 11, 2016

@thomasvl

@jskeet
Copy link
Contributor

jskeet commented May 11, 2016

Here's the change list for the C# part.

In general: some changes are breaking, which require regenerating messages. Most user-written code will not be impacted except for the renaming of enum values.

  • Allow custom type URL prefixes in Any packing, and ignore them when unpacking
  • protoc is now in a separate NuGet package (Google.Protobuf.Tools)
  • New option: internal_access to generate internal classes
  • Enum values are now PascalCased, and if there's a prefix which matches the name of the enum, that is removed (so an enum COLOR with a value COLOR_BLUE would generate a value of just Blue). An option (legacy_enum_values) is temporarily available to disable this, but the option will be removed for GA.
  • json_name option is now honored
  • If group tags are encountered when parsing, they are validated more thoroughly (although we don't support actual groups)
  • NuGet dependencies are better specified
  • Breaking: Preconditions is renamed to ProtoPreconditions
  • Breaking: GeneratedCodeInfo is renamed to GeneratedClrTypeInfo
  • JsonFormatter now allows writing to a TextWriter
  • New interface, ICustomDiagnosticMessage to allow more compact representations from ToString
  • CodedInputStream and CodedOutputStream now implement IDisposable, which simply disposes of the streams they were constructed with
  • Map fields no longer support null values (in line with other languages)
  • Improvements in JSON formatting and parsing

@nmittler
Copy link

Here's some more details for zero-copy:

  • Introduction of the ByteOutput interface. This is similar to OutputStream but provides semantics for lazy writing (i.e. no immediate copy required) of fields that are considered to be immutable.
  • ByteString now supports writing to a ByteOutput, which will directly expose the internals of the ByteString (i.e. byte[] or ByteBuffer) to the ByteOutput without copying.
  • CodedOutputStream now supports writing to a ByteOutput. ByteString instances that are too large to fit in the internal buffer will be (lazily) written to the ByteOutput directly.
  • This allows applications using large ByteString fields to avoid duplication of these fields entirely. Such an application can supply a ByteOutput that chains together the chunks received from CodedOutputStream before forwarding them onto the IO system.

Other related changes to CodedOutputStream:

  • Additional use of sun.misc.Unsafe where possible to perform fast access to byte[] and ByteBuffer values and avoiding unnecessary range checking.
  • ByteBuffer-backed CodedOutputStream now writes directly to the ByteBuffer rather than to an intermediate array.

@thomasvl
Copy link
Contributor

Here's ObjC:

  • Proto comments now come over as HeaderDoc comments in the generated sources so Xcode can pick them up and display them.
  • The library headers have been updated to use HeaderDoc comments so Xcode can pick them up and display them.
  • The per message and per field overhead in both generated code and runtime object sizes was reduced.
  • Generated code now include deprecated annotations when the proto file included them.

@liujisi
Copy link
Contributor Author

liujisi commented May 11, 2016

Thanks for the info. I updated the doc for csharp, zero copy and objc. I will merge the PR now so other can send PRs to add more stuffs.

@liujisi liujisi merged commit 71dd9c4 into protocolbuffers:beta-3 May 11, 2016
@liujisi liujisi deleted the changelog-beta3 branch August 3, 2017 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants