forked from protocolbuffers/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES.txt
2447 lines (2109 loc) · 112 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Unreleased Changes
C++:
* Removed deprecated unsafe arena string accessors
* Enabled heterogeneous lookup for std::string keys in maps.
* Removed implicit conversion from StringPiece to std::string
* Fix use-after-destroy bug when the Map is allocated in the arena.
* Improved the randomness of map ordering
* Added stack overflow protection for text format with unknown fields
* Use std::hash for proto maps to help with portability.
* Added more Windows macros to proto whitelist.
* Arena constructors for map entry messages are now marked "explicit"
(for regular messages they were already explicit).
Python:
* Reject lowercase t for Timestamp json format. Fixes a conformance test.
* Improved the error message when AttributeError is returned from __getattr__
in EnumTypeWrapper.
* Json format will print full_name directly for extensions.
Java:
* Fixed a bug where setting optional proto3 enums with setFooValue() would
not mark the value as present.
C#:
* Dropped support for netstandard1.0 (replaced by support for netstandard1.1).
This was required to modernize the parsing stack to use the `Span<byte>`
type internally. (#7351)
* Add `ParseFrom(ReadOnlySequence<byte>)` method to enable GC friendly
parsing with reduced allocations and buffer copies. (#7351)
* Add `GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE` define to make
generated code compatible with old C# compilers (pre-roslyn compilers
from .NET framework and old versions of mono) that do not support
ref structs. (#7490)
2020-06-01 version 3.12.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Objective-C
* Tweak the union used for Extensions to support old generated code. #7573
2020-05-26 version 3.12.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Simplified the template export macros to fix the build for mingw32. (#7539)
Objective-C
* Fix for the :protobuf_objc target in the Bazel BUILD file. (#7538)
2020-05-20 version 3.12.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Ruby
* Re-add binary gems for Ruby 2.3 and 2.4. These are EOL upstream, however
many people still use them and dropping support will require more
coordination.
2020-05-12 version 3.12.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Protocol Compiler
* [experimental] Singular, non-message typed fields in proto3 now support
presence tracking. This is enabled by adding the "optional" field label and
passing the --experimental_allow_proto3_optional flag to protoc.
* For usage info, see docs/field_presence.md.
* During this experimental phase, code generators should update to support
proto3 presence, see docs/implementing_proto3_presence.md for instructions.
* Allow duplicate symbol names when multiple descriptor sets are passed on
the command-line, to match the behavior when multiple .proto files are passed.
* Deterministic `protoc --descriptor_set_out` (#7175)
C++
* [experimental] Added proto3 presence support.
* New descriptor APIs to support proto3 presence.
* Enable Arenas by default on all .proto files.
* Documented that users are not allowed to subclass Message or MessageLite.
* Mark generated classes as final; inheriting from protos is strongly discouraged.
* Add stack overflow protection for text format with unknown fields.
* Add accessors for map key and value FieldDescriptors.
* Add FieldMaskUtil::FromFieldNumbers().
* MessageDifferencer: use ParsePartial() on Any fields so the diff does not
fail when there are missing required fields.
* ReflectionOps::Merge(): lookup messages in the right factory, if it can.
* Added Descriptor::WellKnownTypes enum and Descriptor::well_known_type()
accessor as an easier way of determining if a message is a Well-Known Type.
* Optimized RepeatedField::Add() when it is used in a loop.
* Made proto move/swap more efficient.
* De-virtualize the GetArena() method in MessageLite.
* Improves performance of json_stream_parser.cc by factor 1000 (#7230)
* bug: #7076 undefine Windows OUT and OPTIONAL macros (#7087)
* Fixed a bug in FieldDescriptor::DebugString() that would erroneously print
an "optional" label for a field in a oneof.
* Fix bug in parsing bool extensions that assumed they are always 1 byte.
* Fix off-by-one error in FieldOptions::ByteSize() when extensions are present.
* Clarified the comments to show an example of the difference between
Descriptor::extension and DescriptorPool::FindAllExtensions.
* Add a compiler option 'code_size' to force optimize_for=code_size on all
protos where this is possible.
Java
* [experimental] Added proto3 presence support.
* Mark java enum _VALUE constants as @Deprecated if the enum field is deprecated
* reduce <clinit> size for enums with allow_alias set to true.
* Sort map fields alphabetically by the field's key when printing textproto.
* Fixed a bug in map sorting that appeared in -rc1 and -rc2 (#7508).
* TextFormat.merge() handles Any as top level type.
* Throw a descriptive IllegalArgumentException when calling
getValueDescriptor() on enum special value UNRECOGNIZED instead of
ArrayIndexOutOfBoundsException.
* Fixed an issue with JsonFormat.printer() where setting printingEnumsAsInts()
would override the configuration passed into includingDefaultValueFields().
* Implement overrides of indexOf() and contains() on primitive lists returned
for repeated fields to avoid autoboxing the list contents.
* Add overload to FieldMaskUtil.fromStringList that accepts a descriptor.
* [bazel] Move Java runtime/toolchains into //java (#7190)
Python
* [experimental] Added proto3 presence support.
* [experimental] fast import protobuf module, only works with cpp generated code linked in.
* Truncate 'float' fields to 4 bytes of precision in setters for pure-Python
implementation (C++ extension was already doing this).
* Fixed a memory leak in C++ bindings.
* Added a deprecation warning when code tries to create Descriptor objects
directly.
* Fix unintended comparison between bytes and string in descriptor.py.
* Avoid printing excess digits for float fields in TextFormat.
* Remove Python 2.5 syntax compatibility from the proto compiler generated _pb2.py module code.
* Drop 3.3, 3.4 and use single version docker images for all python tests (#7396)
JavaScript
* Fix js message pivot selection (#6813)
PHP
* Persistent Descriptor Pool (#6899)
* Implement lazy loading of php class for proto messages (#6911)
* Correct @return in Any.unpack docblock (#7089)
* Ignore unknown enum value when ignore_unknown specified (#7455)
Ruby
* [experimental] Implemented proto3 presence for Ruby. (#7406)
* Stop building binary gems for ruby <2.5 (#7453)
* Fix for wrappers with a zero value (#7195)
* Fix for JSON serialization of 0/empty-valued wrapper types (#7198)
* Call "Class#new" over rb_class_new_instance in decoding (#7352)
* Build extensions for Ruby 2.7 (#7027)
* assigning 'nil' to submessage should clear the field. (#7397)
C#
* [experimental] Add support for proto3 presence fields in C# (#7382)
* Mark GetOption API as obsolete and expose the "GetOptions()" method on descriptors instead (#7491)
* Remove Has/Clear members for C# message fields in proto2 (#7429)
* Enforce recursion depth checking for unknown fields (#7132)
* Fix conformance test failures for Google.Protobuf (#6910)
* Cleanup various bits of Google.Protobuf (#6674)
* Fix latest ArgumentException for C# extensions (#6938)
* Remove unnecessary branch from ReadTag (#7289)
Objective-C
* [experimental] ObjC Proto3 optional support (#7421)
* Block subclassing of generated classes (#7124)
* Use references to Obj C classes instead of names in descriptors. (#7026)
* Revisit how the WKTs are bundled with ObjC. (#7173)
Other
* Add a proto_lang_toolchain for javalite (#6882)
* [bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)
* Add application note for explicit presence tracking. (#7390)
* Howto doc for implementing proto3 presence in a code generator. (#7407)
2020-02-14 version 3.11.4 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C#
* Fix latest ArgumentException for C# extensions (#7188)
* Enforce recursion depth checking for unknown fields (#7210)
Ruby
* Fix wrappers with a zero value (#7195)
* Fix JSON serialization of 0/empty-valued wrapper types (#7198)
2020-01-31 version 3.11.3 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Add OUT and OPTIONAL to windows portability files (#7087)
PHP
* Refactored ulong to zend_ulong for php7.4 compatibility (#7147)
* Call register_class before getClass from desc to fix segfault (#7077)
2019-12-10 version 3.11.2 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP
* Make c extension portable for php 7.4 (#6968)
2019-12-02 version 3.11.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
PHP
* Extern declare protobuf_globals (#6946)
2019-11-19 version 3.11.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Make serialization method naming consistent
* Make proto runtime + generated code free of deprecation warnings
* Moved ShutdownProtobufLibrary() to message_lite.h. For backward compatibility a declaration is still available in stubs/common.h, but users should prefer message_lite.h
* Removed non-namespace macro EXPECT_OK()
* Removed mathlimits.h from stubs in favor of using std::numeric_limits from C++11
* Fixed bug in parser when ending on a group tag
* Add a helper function to UnknownFieldSet to deal with the changing return value of message::unknown_fields()
* Fix incorrect use of string_view iterators
* Support direct pickling of nested messages
* Skip extension tag validation for MessageSet if unknown dependencies are allowed
* Updated deprecation macros to annotate deprecated code (#6612)
* Remove conversion warning in MapEntryFuncs::ByteSizeLong (#6766)
* Revert "Make shared libraries be able to link to MSVC static runtime libraries, so that VC runtime is not required." (#6914)
Java
* Remove the usage of MethodHandle, so that Android users prior to API version 26 can use protobuf-java
* Publish ProGuard config for javalite
* Fix for StrictMode disk read violation in ExtensionRegistryLite
* Include part of the ByteString's content in its toString().
* Include unknown fields when merging proto3 messages in Java lite builders
Python
* Add float_precision option in json format printer
* Optionally print bytes fields as messages in unknown fields, if possible
* FieldPath: fix testing IsSet on root path ''
* Experimental code gen (fast import protobuf module) which only work with cpp generated code linked in
JavaScript
* Remove guard for Symbol iterator for jspb.Map
PHP
* Avoid too much overhead in layout_init (#6716)
* Lazily Create Singular Wrapper Message (#6833)
* Implement lazy loading of php class for proto messages (#6911)
Ruby
* Ruby lazy wrappers optimization (#6797)
C#
* (RepeatedField): Capacity property to resize the internal array (#6530)
* Experimental proto2 support is now officially available (#4642, #5183, #5350, #5936)
* Getting started doc: https://github.com/protocolbuffers/protobuf/blob/master/docs/csharp/proto2.md
* Add length checks to ExtensionCollection (#6759)
* Optimize parsing of some primitive and wrapper types (#6843)
* Use 3 parameter Encoding.GetString for default string values (#6828)
* Change _Extensions property to normal body rather than expression (#6856)
Objective C
* Fixed unaligned reads for 32bit arm with newer Xcode versions (#6678)
2019-09-03 version 3.10.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Switch the proto parser to the faster MOMI parser.
* Properly escape Struct keys in the proto3 JSON serializer.
* Fix crash on uninitialized map entries.
* Informed the compiler of has-bit invariant to produce better code
* Unused imports of files defining descriptor extensions will now be reported
* Add proto2::util::RemoveSubranges to remove multiple subranges in linear time.
* Added BaseTextGenerator::GetCurrentIndentationSize()
* Made implicit weak fields compatible with the Apple linker
* Support 32 bit values for ProtoStreamObjectWriter to Struct.
* Removed the internal-only header coded_stream_inl.h and the internal-only methods defined there.
* Enforced no SWIG wrapping of descriptor_database.h (other headers already had this restriction).
* Implementation of the equivalent of the MOMI parser for serialization. This removes one of the two serialization routines, by making the fast array serialization routine completely general. SerializeToCodedStream can now be implemented in terms of the much much faster array serialization. The array serialization regresses slightly, but when array serialization is not possible this wins big.
* Do not convert unknown field name to snake case to accurately report error.
* Fix a UBSAN warnings. (#6333)
* Add podspec for C++ (#6404)
* protoc: fix source code info location for missing label (#6436)
* C++ Add move constructor for Reflection's SetString (#6477)
Java
* Call loadDescriptor outside of synchronized block to remove one possible source of deadlock.
* Have oneof enums implement a separate interface (other than EnumLite) for clarity.
* Opensource Android Memory Accessors
* Update TextFormat to make use of the new TypeRegistry.
* Support getFieldBuilder and getRepeatedFieldBuilder in ExtendableBuilder
* Update JsonFormat to make use of the new TypeRegistry.
* Add proguard config generator for GmmBenchmarkSuiteLite.
* Change ProtobufArrayList to use Object[] instead of ArrayList for 5-10% faster parsing
* Implement ProtobufArrayList.add(E) for 20% (5%-40%) faster overall protolite2 parsing
* Make a copy of JsonFormat.TypeRegistry at the protobuf top level package. This will eventually replace JsonFormat.TypeRegistry.
* Fix javadoc warnings in generated files (#6231)
* Java: Add Automatic-Module-Name entries to the Manifest (#6568)
Python
* Add descriptor methods in descriptor_pool are deprecated.
* Uses explicit imports to prevent multithread test failures in py3.
* Added __delitem__ for Python extension dict
* Update six version to 1.12.0 and fix legacy_create_init issue (#6391)
JavaScript
* Remove deprecated boolean option to getResultBase64String().
* Fix sint64 zig-zag encoding.
* Simplify hash64 string conversion to avoid DIGIT array. Should reduce overhead if these functions aren't used, and be more efficient by avoiding linear array searches.
* Change the parameter types of binaryReaderFn in ExtensionFieldBinaryInfo to (number, ?, ?).
* Create dates.ts and time_of_days.ts to mirror Java versions. This is a near-identical conversion of c.g.type.util.{Dates,TimeOfDays} respectively.
* Migrate moneys to TypeScript.
PHP
* Fix incorrect leap day for Timestamp (#6696)
* Initialize well known type values (#6713)
Ruby
* Fix scope resolution for Google namespace (#5878)
* Support hashes for struct initializers (#5716)
* Optimized away the creation of empty string objects. (#6502)
* Roll forward Ruby upb changes now that protobuf Ruby build is fixed (#5866)
* Optimized layout_mark() for Ruby (#6521)
* Optimization for layout_init() (#6547)
* Fix for GC of Ruby map frames. (#6533)
* Fixed leap year handling by reworking upb_mktime() -> upb_timegm(). (#6695)
Objective C
* Remove OSReadLittle* due to alignment requirements (#6678)
* Don't use unions and instead use memcpy for the type swaps. (#6672)
Other
* Override CocoaPods module to lowercase (#6464)
2019-06-28 version 3.9.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Optimize and simplify implementation of RepeatedPtrFieldBase
* Don't create unnecessary unknown field sets.
* Remove branch from accessors to repeated field element array.
* Added delimited parse and serialize util.
* Reduce size by not emitting constants for fieldnumbers
* Fix a bug when comparing finite and infinite field values with explicit tolerances.
* TextFormat::Parser should use a custom Finder to look up extensions by number if one is provided.
* Add MessageLite::Utf8DebugString() to make MessageLite more compatible with Message.
* Fail fast for better performance in DescriptorPool::FindExtensionByNumber() if descriptor has no defined extensions.
* Adding the file name to help debug colliding extensions
* Added FieldDescriptor::PrintableNameForExtension() and DescriptorPool::FindExtensionByPrintableName().
The latter will replace Reflection::FindKnownExtensionByName().
* Replace NULL with nullptr
* Created a new Add method in repeated field that allows adding a range of elements all at once.
* Enabled enum name-to-value mapping functions for C++ lite
* Avoid dynamic initialization in descriptor.proto generated code
* Move stream functions to MessageLite from Message.
* Move all zero_copy_stream functionality to io_lite.
* Do not create array of matched fields for simple repeated fields
* Enabling silent mode by default to reduce make compilation noise. (#6237)
Java
* Expose TextFormat.Printer and make it configurable. Deprecate the static methods.
* Library for constructing google.protobuf.Struct and google.protobuf.Value
* Make OneofDescriptor extend GenericDescriptor.
* Expose streamingness of service methods from MethodDescriptor.
* Fix a bug where TextFormat fails to parse Any filed with > 1 embedded message sub-fields.
* Establish consistent JsonFormat behavior for nulls in oneofs, regardless of order.
* Update GSON version to 3.8.5. (#6268)
* Add `protobuf_java_lite` Bazel target. (#6177)
Python
* Change implementation of Name() for enums that allow aliases in proto2 in Python
to be in line with claims in C++ implementation (to return first value).
* Explicitly say what field cannot be set when the new value fails a type check.
* Duplicate register in descriptor pool will raise errors
* Add __slots__ to all well_known_types classes, custom attributes are not allowed anymore.
* text_format only present 8 valid digits for float fields by default
JavaScript
* Add Oneof enum to the list of goog.provide
PHP
* Make php message class final to avoid mocking. (#6277)
* Rename get/setXXXValue to get/setXXXWrapper. (#6295)
Ruby
* Remove to_hash methods. (#6166)
2019-04-29 version 3.8.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Use std::atomic<int32> in case of myriad2 platform
* Always declare enums to be int-sized
* Added DebugString() and ShortDebugString() methods on MessageLite
* Specialized different parse loop control flows
* Make hasbits potentially in register. The or's start forming an obstacle because it's a read modify store on the same mem address on each iteration.
* Move to an internal MACRO for parser validity checks.
* Improve map parsing performance.
* Make MergePartialFromCodedStream non virtual. This allows direct calls, potential inlining and is also a code health improvement
* Add an overall limit to parse_context to prevent reading past it. This allows to remove a annoying level of indirection.
* Fix a mistake, we shouldn't verify map key/value strings for utf8 in opt mode for proto2.
* Further improvements to cut binary size.
* Prepare to make MergePartialFromCodedStream non-virtual.
* A report on some interesting behavior change in python (caused by b/27494216) made me realize there is a check that needs to be done in case the parse ended on a end group tag.
* Add a note of caution to the comments around skip in CodedOutputStream.
* Simplify end check.
* Add overload for ParseMessage for MessageLite/Message types. If the explicit type is not known inlining won't help de-virtualizing the virtual call.
* Reduce linker input. It turns out that ParseMessage is not inlined, producing template instantiations that are used only once and save nothing but cost more.
* Improve the parser.
* [c++17] Changed proto2::RepeatedPtrField iterators to no longer derive from the deprecated std::iterator class.
* Change the default value of case_insensitive_enum_parsing to false for JsonStringToMessage.
* Add a warning if a field name doesn't match the style guide.
* Fix TextFormat not round-trip correctly when float value is max float.
* Added locationed info for some errors at compiler
* Python reserved keywords are now working with getattr()/setattr() for most descriptors.
* Added AllowUnknownField() in text_format
* Append '_' to C++ reserved keywords for message, enum, extension
* Fix MSVC warning C4244 in protobuf's parse_context.h.
* Updating Iterators to be compatible with C++17 in MSVC.
* Use capability annotation in mutex.h
* Fix "UndefinedBehaviorSanitizer: cfi-bad-type"
* CriticalSectionLock class as a lightweight replacement for std::mutex on Windows platforms.
* Removed vestigial wire_format_lite_inl.h
C#
* Added System.Memory dependency.
Java
* Make Java protoc code generator ignore optimize_for LITE_RUNTIME. Users should instead use the Java lite protoc plugin.
* Change Extension getMessageDefaultInstance() to return Message instead of MessageLite.
* Prevent malicious input streams from leaking buffers for ByteString or ByteBuffer parsing.
* Release new Javalite runtime.
* Show warning in case potential file name conflict.
* Allow Java reserved keywords to be used in extensions.
* Added setAllowUnknownFields() in text format
* Add memoization to ExtensionRegistryLite.getEmptyRegistry()
* Improve performance of CodedOutputStream.writeUInt32NoTag
* Add an optimized mismatch-finding algorithm to UnsafeUtil.
* When serializing uint32 varints, check that we have MAX_VARINT32_SIZE bytes left, not just MAX_VARINT_SIZE.
* Minor optimization to RopeByteString.PieceIterator
JavaScript
* Simplify generated toObject code when the default value is used.
Python
* Changes implementation of Name() for enums that allow aliases in proto2 in Python to be in line with claims in C++ implementation (to return first value).
* Added double_format option in text format printer.
* Added iter and __contains__ to extension dict
* Added allow_unknown_field option in python text format parser
* Fixed Timestamp.ToDatetime() loses precision issue
* Support unknown field in text format printer.
* Float field will be convert to inf if bigger than struct.unpack('f', b'\xff\xff\x7f\x7f')[0] which is about 3.4028234664e+38,
convert to -inf if smaller than -3.4028234664e+38
* Allowed casting str->bytes in Message.__setstate__
Ruby
* Helper methods to get enum name for Ruby.
2019-01-24 version 3.7.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Introduced new MOMI (maybe-outside-memory-interval) parser.
* Add an option to json_util to parse enum as case-insensitive. In the future, enum parsing in json_util will become case-sensitive.
* Added conformance test for enum aliases
* Added support for --cpp_out=speed:...
* Added use of C++ override keyword where appropriate
* Many other cleanups and fixes.
Java
* Fix illegal reflective access warning in JDK 9+
* Add BOM
Python
* Added Python 3.7 compatibility.
* Modified ParseFromString to return bytes parsed .
* Introduce Proto C API.
* FindFileContainingSymbol in descriptor pool is now able to find field and enum values.
* reflection.MakeClass() and reflection.ParseMessage() are deprecated.
* Added DescriptorPool.FindMethodByName() method in pure python (c extension already has it)
* Flipped proto3 to preserve unknown fields by default.
* Added support for memoryview in python3 proto message parsing.
* Added MergeFrom for repeated scalar fields in c extension (pure python already has it)
* Surrogates are now rejected at setters in python3.
* Added public unknown field API.
* RecursionLimit is also set to max if allow_oversize_protos is enabled.
* Disallow duplicate scalars in proto3 text_format parse.
* Fix some segment faults for c extension map field.
PHP
* Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_php_c.txt.
* Supports php 7.3
* Added helper methods to convert between enum values and names.
* Allow setting/getting wrapper message fields using primitive values.
* Various bug fixes.
Ruby
* Ruby 2.6 support.
* Drops support for ruby < 2.3.
* Most issues for json encoding/decoding in the c extension have been fixed. There are still some edge cases not fixed. For more details, check conformance/failure_list_ruby.txt.
* Json parsing can specify an option to ignore unknown fields: msg.decode_json(data, {ignore_unknown_fields: true}).
* Added support for proto2 syntax (partially).
* Various bug fixes.
Csharp
* More support for FieldMask include merge, intersect and more.
* Increasing the default recursion limit to 100.
* Support loading FileDescriptors dynamically.
* Provide access to comments from descriptors.
* Added Any.Is method.
* Compatible with C# 6
* Added IComparable and comparison operators on Timestamp.
Objective C
* Add ability to introspect list of enum values (#4678)
* Copy the value when setting message/data fields (#5215)
* Support suppressing the objc package prefix checks on a list of files (#5309)
* More complete keyword and NSObject method (via categories) checks for field names, can result in more fields being rename, but avoids the collisions at runtime (#5289)
* Small fixes to TextFormat generation for extensions (#5362)
* Provide more details/context in deprecation messages (#5412)
* Array/Dictionary enumeration blocks NS_NOESCAPE annotation for Swift (#5421)
* Properly annotate extensions for ARC when their names imply behaviors (#5427)
* Enum alias name collision improvements (#5480)
2018-07-27 version 3.6.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Introduced workaround for Windows issue with std::atomic and std::once_flag
initialization (#4777, #4773).
PHP
* Added compatibility with PHP 7.3 (#4898).
Ruby
* Fixed Ruby crash involving Any encoding (#4718).
2018-06-01 version 3.6.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
C++
* Starting from this release, we now require C++11. For those we cannot yet
upgrade to C++11, we will try to keep the 3.5.x branch updated with
critical bug fixes only. If you have any concerns about this, please
comment on issue #2780.
* Moved to C++11 types like std::atomic and std::unique_ptr and away from our
old custom-built equivalents.
* Added support for repeated message fields in lite protos using implicit
weak fields. This is an experimental feature that allows the linker to
strip out more unused messages than previously was possible.
* Fixed SourceCodeInfo for interpreted options and extension range options.
* Fixed always_print_enums_as_ints option for JSON serialization.
* Added support for ignoring unknown enum values when parsing JSON.
* Create std::string in Arena memory.
* Fixed ValidateDateTime to correctly check the day.
* Fixed bug in ZeroCopyStreamByteSink.
* Various other cleanups and fixes.
Java
* Dropped support for Java 6.
* Added a UTF-8 decoder that uses Unsafe to directly decode a byte buffer.
* Added deprecation annotations to generated code for deprecated oneof
fields.
* Fixed map field serialization in DynamicMessage.
* Cleanup and documentation for Java Lite runtime.
* Various other fixes and cleanups
* Fixed unboxed arraylists to handle an edge case
* Improved performance for copying between unboxed arraylists
* Fixed lite protobuf to avoid Java compiler warnings
* Improved test coverage for lite runtime
* Performance improvements for lite runtime
Python
* Fixed bytes/string map key incompatibility between C++ and pure-Python
implementations (issue #4029)
* Added __init__.py files to compiler and util subpackages
* Use /MT for all Windows versions
* Fixed an issue affecting the Python-C++ implementation when used with
Cython (issue #2896)
* Various text format fixes
* Various fixes to resolve behavior differences between the pure-Python and
Python-C++ implementations
PHP
* Added php_metadata_namespace to control the file path of generated metadata
file.
* Changed generated classes of nested message/enum. E.g., Foo.Bar, which
previously generates Foo_Bar, now generates Foo/Bar
* Added array constructor. When creating a message, users can pass a php
array whose content is field name to value pairs into constructor. The
created message will be initialized according to the array. Note that
message field should use a message value instead of a sub-array.
* Various bug fixes.
Objective-C
* We removed some helper class methods from GPBDictionary to shrink the size
of the library, the functionary is still there, but you may need to do some
specific +alloc / -init… methods instead.
* Minor improvements in the performance of object field getters/setters by
avoiding some memory management overhead.
* Fix a memory leak during the raising of some errors.
* Make header importing completely order independent.
* Small code improvements for things the undefined behaviors compiler option
was flagging.
Ruby
* Added ruby_package file option to control the module of generated class.
* Various bug fixes.
Javascript
* Allow setting string to int64 field.
Csharp
* Unknown fields are now parsed and then sent back on the wire. They can be
discarded at parse time via a CodedInputStream option.
* Movement towards working with .NET 3.5 and Unity
* Expression trees are no longer used
* AOT generics issues in Unity/il2cpp have a workaround (see this commit for
details)
* Floating point values are now compared bitwise (affects NaN value
comparisons)
* The default size limit when parsing is now 2GB rather than 64MB
* MessageParser now supports parsing from a slice of a byte array
* JSON list parsing now accepts null values where the underlying proto
representation does
2017-12-20 version 3.5.1 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* Make C++ implementation C++11 only: we plan to require C++11 to build
protobuf code starting from 3.6.0 release. Please join this github issue:
https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
protoc
* Fixed a bug introduced in 3.5.0 and protoc in Windows now accepts non-ascii
characters in paths again.
C++
* Removed several usages of C++11 features in the code base.
* Fixed some compiler warnings.
PHP
* Fixed memory leak in C-extension implementation.
* Added discardUnknokwnFields API.
* Removed duplicated typedef in C-extension headers.
* Avoided calling private php methods (timelib_update_ts).
* Fixed Any.php to use fully-qualified name for DescriptorPool.
Ruby
* Added Google_Protobuf_discard_unknown for discarding unknown fields in
messages.
C#
* Unknown fields are now preserved by default.
* Floating point values are now bitwise compared, affecting message equality
check and Contains() API in map and repeated fields.
2017-11-13 version 3.5.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* Make C++ implementation C++11 only: we plan to require C++11 to build
protobuf code starting from 3.6.0 release. Please join this github issue:
https://github.com/protocolbuffers/protobuf/issues/2780 to provide your feedback.
General
* Unknown fields are now preserved in proto3 for most of the language
implementations for proto3 by default. See the per-language section for
details.
* reserve keyword are now supported in enums
C++
* Proto3 messages are now preserving unknown fields by default. If you rely on
unknowns fields being dropped. Please use DiscardUnknownFields() explicitly.
* Deprecated the unsafe_arena_release_* and unsafe_arena_add_allocated_*
methods for string fields.
* Added move constructor and move assignment to RepeatedField,
RepeatedPtrField and google::protobuf::Any.
* Added perfect forwarding in Arena::CreateMessage
* In-progress experimental support for implicit weak fields with lite protos.
This feature allows the linker to strip out more unused messages and reduce
binary size.
* Various performance optimizations.
Java
* Proto3 messages are now preserving unknown fields by default. If you’d like
to drop unknown fields, please use the DiscardUnknownFieldsParser API. For
example:
Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
Foo foo = parser.parseFrom(input);
* Added a new CodedInputStream decoder for Iterable<ByteBuffer> with direct
ByteBuffers.
* TextFormat now prints unknown length-delimited fields as messages if
possible.
* FieldMaskUtil.merge() no longer creates unnecessary empty messages when a
message field is unset in both source message and destination message.
* Various performance optimizations.
Python
* Proto3 messages are now preserving unknown fields by default. Use
message.DiscardUnknownFields() to drop unknown fields.
* Add FieldDescriptor.file in generated code.
* Add descriptor pool FindOneofByName in pure python.
* Change unknown enum values into unknown field set .
* Add more Python dict/list compatibility for Struct/ListValue.
* Add utf-8 support for text_format.Merge()/Parse().
* Support numeric unknown enum values for proto3 JSON format.
* Add warning for Unexpected end-group tag in cpp extension.
PHP
* Proto3 messages are now preserving unknown fields.
* Provide well known type messages in runtime.
* Add prefix ‘PB’ to generated class of reserved names.
* Fixed all conformance tests for encode/decode json in php runtime. C
extension needs more work.
Objective-C
* Fixed some issues around copying of messages with unknown fields and then
mutating the unknown fields in the copy.
C#
* Added unknown field support in JsonParser.
* Fixed oneof message field merge.
* Simplify parsing messages from array slices.
Ruby
* Unknown fields are now preserved by default.
* Fixed several bugs for segment fault.
Javascript
* Decoder can handle both paced and unpacked data no matter how the proto is
defined.
* Decoder now accept long varint for 32 bit integers.
2017-08-14 version 3.4.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* There are some changes that are not included in this release but are planned
for the near future
- Preserve unknown fields in proto3: We are going to bring unknown fields
back into proto3. In this release, some languages start to support
preserving unknown fields in proto3, controlled by flags/options. Some
languages also introduce explicit APIs to drop unknown fields for
migration. Please read the change log sections by languages for details.
For general timeline and plan:
https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
For issues and discussions:
https://github.com/protocolbuffers/protobuf/issues/272
- Make C++ implementation C++11 only: we plan to require C++11 to build
protobuf code starting from 3.5.0 or 3.6.0 release, after unknown fields
semantic changes are finished. Please join this
github issue:
https://github.com/protocolbuffers/protobuf/issues/2780
to provide your feedback.
General
* Extension ranges now accept options and are customizable.
* "reserve" keyword now supports “max” in field number ranges,
e.g. reserve 1000 to max;
C++
* Proto3 messages are now able to preserve unknown fields. The default
behavior is still to drop unknowns, which will be flipped in a future
release. If you rely on unknowns fields being dropped. Please use
Message::DiscardUnknownFields() explicitly.
* Packable proto3 fields are now packed by default in serialization.
* Following C++11 features are introduced when C++11 is available:
- move-constructor and move-assignment are introduced to messages
- Repeated fields constructor now takes std::initializer_list
- rvalue setters are introduced for string fields
* Experimental Table-Driven parsing and serialization available to test. To
enable it, pass in table_driven_parsing table_driven_serialization protoc
generator flags for C++
$ protoc --cpp_out=table_driven_parsing,table_driven_serialization:./ \
test.proto
* lite generator parameter supported by the generator. Once set, all generated
files, use lite runtime regardless of the optimizer_for setting in the
.proto file.
* Various optimizations to make C++ code more performant on PowerPC platform
* Fixed maps data corruption when the maps are modified by both reflection API
and generated API.
* Deterministic serialization on maps reflection now uses stable sort.
* file() accessors are introduced to various *Descriptor classes to make
writing template function easier.
* ByteSize() and SpaceUsed() are deprecated.Use ByteSizeLong() and
SpaceUsedLong() instead
* Consistent hash function is used for maps in DEBUG and NDEBUG build.
* "using namespace std" is removed from stubs/common.h
* Various performance optimizations and bug fixes
Java
* Introduced new parser API DiscardUnknownFieldsParser in preparation of
proto3 unknown fields preservation change. Users who want to drop unknown
fields should migrate to use this new parser API. For example:
Parser<Foo> parser = DiscardUnknownFieldsParser.wrap(Foo.parser());
Foo foo = parser.parseFrom(input);
* Introduced new TextFormat API printUnicodeFieldValue() that prints field
value without escaping unicode characters.
* Added Durations.compare(Duration, Duration) and
Timestamps.compare(Timestamp, Timestamp).
* JsonFormat now accepts base64url encoded bytes fields.
* Optimized CodedInputStream to do less copies when parsing large bytes
fields.
* Optimized TextFormat to allocate less memory when printing.
Python
* SerializeToString API is changed to SerializeToString(self, **kwargs),
deterministic parameter is accepted for deterministic serialization.
* Added sort_keys parameter in json format to make the output deterministic.
* Added indent parameter in json format.
* Added extension support in json format.
* Added __repr__ support for repeated field in cpp implementation.
* Added file in FieldDescriptor.
* Added pretty-print filter to text format.
* Services and method descriptors are always printed even if generic_service
option is turned off.
* Note: AppEngine 2.5 is deprecated on June 2017 that AppEngine 2.5 will
never update protobuf runtime. Users who depend on AppEngine 2.5 should use
old protoc.
PHP
* Support PHP generic services. Specify file option php_generic_service=true
to enable generating service interface.
* Message, repeated and map fields setters take value instead of reference.
* Added map iterator in c extension.
* Support json encode/decode.
* Added more type info in getter/setter phpdoc
* Fixed the problem that c extension and php implementation cannot be used
together.
* Added file option php_namespace to use custom php namespace instead of
package.
* Added fluent setter.
* Added descriptor API in runtime for custom encode/decode.
* Various bug fixes.
Objective-C
* Fix for GPBExtensionRegistry copying and add tests.
* Optimize GPBDictionary.m codegen to reduce size of overall library by 46K
per architecture.
* Fix some cases of reading of 64bit map values.
* Properly error on a tag with field number zero.
* Preserve unknown fields in proto3 syntax files.
* Document the exceptions on some of the writing apis.
C#
* Implemented IReadOnlyDictionary<K,V> in MapField<K,V>
* Added TryUnpack method for Any message in addition to Unpack.
* Converted C# projects to MSBuild (csproj) format.
Ruby
* Several bug fixes.
Javascript
* Added support of field option js_type. Now one can specify the JS type of a
64-bit integer field to be string in the generated code by adding option
[jstype = JS_STRING] on the field.
2017-04-05 version 3.3.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript)
Planned Future Changes
* There are some changes that are not included in this release but are
planned for the near future:
- Preserve unknown fields in proto3: please read this doc:
https://docs.google.com/document/d/1KMRX-G91Aa-Y2FkEaHeeviLRRNblgIahbsk4wA14gRk/view
for the timeline and follow up this github issue:
https://github.com/protocolbuffers/protobuf/issues/272
for discussion.
- Make C++ implementation C++11 only: we plan to require C++11 to build
protobuf code starting from 3.4.0 or 3.5.0 release. Please join this
github issue:
https://github.com/protocolbuffers/protobuf/issues/2780
to provide your feedback.
C++
* Fixed map fields serialization of DynamicMessage to correctly serialize
both key and value regardless of their presence.
* Parser now rejects field number 0 correctly.
* New API Message::SpaceUsedLong() that’s equivalent to
Message::SpaceUsed() but returns the value in size_t.
* JSON support
- New flag always_print_enums_as_ints in JsonPrintOptions.
- New flag preserve_proto_field_names in JsonPrintOptions. It will instruct
the JSON printer to use the original field name declared in the .proto
file instead of converting them to lowerCamelCase when printing JSON.
- JsonPrintOptions.always_print_primtive_fields now works for oneof message
fields.
- Fixed a bug that doesn’t allow different fields to set the same json_name
value.
- Fixed a performance bug that causes excessive memory copy when printing
large messages.
* Various performance optimizations.
Java
* Map field setters eagerly validate inputs and throw NullPointerExceptions
as appropriate.
* Added ByteBuffer overloads to the generated parsing methods and the Parser
interface.
* proto3 enum's getNumber() method now throws on UNRECOGNIZED values.
* Output of JsonFormat is now locale independent.
Python
* Added FindServiceByName() in the pure-Python DescriptorPool. This works only
for descriptors added with DescriptorPool.Add(). Generated descriptor_pool
does not support this yet.
* Added a descriptor_pool parameter for parsing Any in text_format.Parse().
* descriptor_pool.FindFileContainingSymbol() now is able to find nested
extensions.
* Extending empty [] to repeated field now sets parent message presence.
PHP
* Added file option php_class_prefix. The prefix will be prepended to all
generated classes defined in the file.
* When encoding, negative int32 values are sign-extended to int64.
* Repeated/Map field setter accepts a regular PHP array. Type checking is
done on the array elements.
* encode/decode are renamed to serializeToString/mergeFromString.
* Added mergeFrom, clear method on Message.
* Fixed a bug that oneof accessor didn’t return the field name that is
actually set.
* C extension now works with php7.
* This is the first GA release of PHP. We guarantee that old generated code
can always work with new runtime and new generated code.
Objective-C
* Fixed help for GPBTimestamp for dates before the epoch that contain
fractional seconds.
* Added GPBMessageDropUnknownFieldsRecursively() to remove unknowns from a
message and any sub messages.
* Addressed a threading race in extension registration/lookup.
* Increased the max message parsing depth to 100 to match the other languages.
* Removed some use of dispatch_once in favor of atomic compare/set since it
needs to be heap based.
* Fixes for new Xcode 8.3 warnings.
C#
* Fixed MapField.Values.CopyTo, which would throw an exception unnecessarily
if provided exactly the right size of array to copy to.
* Fixed enum JSON formatting when multiple names mapped to the same numeric
value.
* Added JSON formatting option to format enums as integers.
* Modified RepeatedField<T> to implement IReadOnlyList<T>.
* Introduced the start of custom option handling; it's not as pleasant as it
might be, but the information is at least present. We expect to extend code
generation to improve this in the future.
* Introduced ByteString.FromStream and ByteString.FromStreamAsync to
efficiently create a ByteString from a stream.
* Added whole-message deprecation, which decorates the class with [Obsolete].
Ruby
* Fixed Message#to_h for messages with map fields.
* Fixed memcpy() in binary gems to work for old glibc, without breaking the
build for non-glibc libc’s like musl.
Javascript
* Added compatibility tests for version 3.0.0.
* Added conformance tests.
* Fixed serialization of extensions: we need to emit a value even if it is
falsy (like the number 0).
* Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript.
2017-01-23 version 3.2.0 (C++/Java/Python/PHP/Ruby/Objective-C/C#/JavaScript/Lite)
General
* Added protoc version number to protoc plugin protocol. It can be used by
protoc plugin to detect which version of protoc is used with the plugin and
mitigate known problems in certain version of protoc.
C++
* The default parsing byte size limit has been raised from 64MB to 2GB.
* Added rvalue setters for non-arena string fields.
* Enabled debug logging for Android.
* Fixed a double-free problem when using Reflection::SetAllocatedMessage()
with extension fields.
* Fixed several deterministic serialization bugs:
* MessageLite::SerializeAsString() now respects the global deterministic
serialization flag.
* Extension fields are serialized deterministically as well. Fixed protocol
compiler to correctly report importing-self as an error.
* Fixed FileDescriptor::DebugString() to print custom options correctly.
* Various performance/codesize optimizations and cleanups.
Java
* The default parsing byte size limit has been raised from 64MB to 2GB.
* Added recursion limit when parsing JSON.
* Fixed a bug that enumType.getDescriptor().getOptions() doesn't have custom
options.
* Fixed generated code to support field numbers up to 2^29-1.
Python
* You can now assign NumPy scalars/arrays (np.int32, np.int64) to protobuf
fields, and assigning other numeric types has been optimized for
performance.
* Pure-Python: message types are now garbage-collectable.
* Python/C++: a lot of internal cleanup/refactoring.
PHP (Alpha)
* For 64-bit integers type (int64/uint64/sfixed64/fixed64/sint64), use PHP
integer on 64-bit environment and PHP string on 32-bit environment.
* PHP generated code also conforms to PSR-4 now.
* Fixed ZTS build for c extension.