Commit Graph

7456 Commits

Author SHA1 Message Date
Elliotte Rusty Harold
47434eb43d
deps: update errorprone to 2.3.4 (#7125) (#7157) 2020-01-31 09:43:24 -08:00
Luca Santarella
c5eada8eeb
Refactored ulong to zend_ulong for php7.4 compatibility (#7147) 2020-01-30 16:47:32 -08:00
Rafi Kamal
4cf5bfee95
Install RubyGem bundler version specified in Gemfile.lock to fix release failure (#7144)
* Update Gem version to fix Ruby release failure

Ref: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
2020-01-30 13:08:31 -08:00
Paul Yang
85219578fa
Add continuous test for php7.4 on mac (#7153) 2020-01-30 12:45:47 -08:00
Dave MacLachlan
302f3ea1e5 Update GOOGLE_PROTOBUF_OBJC_VERSION to 30003 2020-01-30 13:08:32 -05:00
Elliotte Rusty Harold
5e014c2ddf
Update JUnit and Truth (#7149) 2020-01-29 12:51:46 -08:00
Elliotte Rusty Harold
a62ee83401 deps: update errorprone to 2.3.4 (#7125)
deps: update errorprone to 2.3.4
2020-01-28 12:16:17 -08:00
Dave MacLachlan
f4a6b99339 Block subclassing
Add GPB_FINAL macro to block subclassing of generated ObjC classes.
2020-01-24 11:51:37 -05:00
dmaclach
6f9d488149 Move min Xcode version to 10.3
Xcode 10.1 has a compiler bug that breaks on generated code.
Xcode 10.3+ appear to be fine.
2020-01-23 16:43:00 -05:00
Thomas Van Lenten
effb65d4e3 Move a few more size() > 0 calls over to !empty(). 2020-01-23 12:53:52 -05:00
Thomas Van Lenten
edf69e5858 Make the unittest proto file generation handle additions better.
Didn't really handle when a file was missing, but all the other were up to date,
this handles that case also.
2020-01-23 08:30:51 -05:00
Paul Yang
e8016753e3
Maven requires https connection (#7110) (#7114) 2020-01-22 12:29:56 -08:00
Dave MacLachlan
e3c2af349f Clean up some warning messages.
- size vs empty
- unused decls
2020-01-22 14:42:57 -05:00
Paul Yang
629ca244a1
Call register_class before getClass from desc (#7077)
* Call register_class before getClass from desc

* Remove debug code
2020-01-21 15:38:42 -08:00
Dave MacLachlan
ab48ecf140 Update pddm to work with clang-format
Add clang-format off/on directives around pddm expansions to simplify formatting other code.
2020-01-21 13:14:01 -05:00
Dave MacLachlan
aa1d7e7c48 Change Objective C class references to using macros.
Allows easy replacing of class names in generated code using #define to redefine class names at compile time.
2020-01-21 12:12:11 -05:00
Paul Yang
39f4240856
Maven requires https connection (#7110) 2020-01-20 19:23:06 -08:00
Andres Valdes
35febfc2e9 Correct @return in Any.unpack docblock (#7089)
As per https://docs.phpdoc.org/latest/references/phpdoc/tags/return.html, the first token after the @return tag should be the return type.
2020-01-20 16:32:11 -08:00
Maxime Guerreiro
158b269097 Cleanup the RPC Implementations section
Remove dead links and update the ones that were moved.

Use https when possible.

Isolate inactive projects (not updated in the last few years) in a subsection.

release notes: no
2020-01-17 16:08:02 -08:00
dmaclach
f4b6e4a561 Clean up use of size() > 0 to !empty() 2020-01-15 17:54:53 -05:00
dmaclach
836d81a826 Fix up parameter name so decl matches defn
className -> class_name
2020-01-15 17:53:56 -05:00
Dave MacLachlan
74956e1c15 Use references to Objective C classes instead of looking classes up by name.
This should reduce binary size slightly, small performance improvement, and improve linkage by forcing references to all used classes.

Note that this maintains backwards compatibility for sources generated by older protoc for the time being. If you want the benefits
you will need to recompile your protos with the newer protoc.
2020-01-15 15:01:53 -05:00
Yannic
948740bc9d [bazel] Fix blacklisted_protos in cc_toolchain and add test (#7075) 2020-01-15 10:27:35 -08:00
Yannic
29cd005ce1 [bazel] Fix blacklisted_protos in cc_toolchain and add test (#7096) 2020-01-15 10:22:16 -08:00
Scott Hart
80eca4c1cd bug: #7076 adds OUT and OPTIONAL to windows portability files (#7088) 2020-01-13 15:21:40 -08:00
Scott Hart
2d9b1788e7 bug: #7076 adds OUT and OPTIONAL to windows portability files (#7087) 2020-01-13 15:21:27 -08:00
salamaniibm
c3ffdabed5 correcting the s390x Arch name 2020-01-10 16:07:15 -08:00
Elliotte Rusty Harold
5a578d2a5c deps: update guava to 28.2-android 2020-01-10 10:52:48 -08:00
Jingwen Chen
abc5062a61 Migrate from maven_jar to jvm_maven_import_external to prepare for Bazel 2.0 2020-01-09 14:10:34 -08:00
Yannic
77f30b686b Blacklist .proto source files if Bazel allows us to (#7065)
* Blacklist .proto source files is Bazel allows us to

This is a partial revert of 7b28278c7d to unblock, e.g., https://github.com/grpc/grpc/pull/21590 or https://github.com/lyft/envoy-mobile/issues/617 until Bazel is fixed.

Note: this is a forward-compatible change that automatically switches to the behavior intended by 7b28278c7d when a compatible Bazel is released without requiring users to upgrade Protobuf. We will revert this change when Bazel is fixed.

* Remove trailing ,

* Update BUILD
2020-01-09 14:10:34 -08:00
Yannic
082cc23afd Blacklist .proto source files if Bazel allows us to (#7065)
* Blacklist .proto source files is Bazel allows us to

This is a partial revert of 7b28278c7d to unblock, e.g., https://github.com/grpc/grpc/pull/21590 or https://github.com/lyft/envoy-mobile/issues/617 until Bazel is fixed.

Note: this is a forward-compatible change that automatically switches to the behavior intended by 7b28278c7d when a compatible Bazel is released without requiring users to upgrade Protobuf. We will revert this change when Bazel is fixed.

* Remove trailing ,

* Update BUILD
2020-01-09 10:23:02 -08:00
Rafi Kamal
ed8688de72
Merge pull request #7064 from rafi-kamal/3.11.x-202001071136
Merge branch 3.11.x to master
2020-01-08 12:24:20 -08:00
Brian Wignall
a104dffcb6 Fix typos (#7050)
Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos, with https://github.com/bwignall/typochecker to help automate the checking.
2020-01-08 10:18:20 -08:00
Jesse Wilson
3214d0b0b2 Fix mergeable docs to be consistent with checks (#7021) 2020-01-07 11:57:00 -08:00
Rafi Kamal
4500f31a6a Merge branch 3.11.x to master 2020-01-07 11:52:29 -08:00
Rafi Kamal
80eadc050d
Remove the section for uploading protoc packages to the GitHub release page (#6805)
Currently this is managed by the release script. We should also possibly remove the section for "Push artifacts to Maven Central"
2020-01-07 10:53:17 -08:00
Jie Luo
63cfdafacb
Fix python release breakages by set MB_PYTHON_OSX_VER (#7038) 2019-12-19 14:06:29 -08:00
Jie Luo
03ba4ac171
Add python3.8 in build_artifacts for linux and macos (#7019) 2019-12-19 10:27:39 -08:00
Jesse Wilson
6263268b8c Reserve 1076, 1077 for Wire since and until
release notes: no
2019-12-17 10:27:25 -08:00
Jie Luo
7faab5eeeb add python38 (#7009)
* add python38

* add python3.8

* fix tox
2019-12-13 15:49:18 -08:00
Rafi Kamal
04a11fc916
Remove duplicate license header from test protos (#7011) 2019-12-12 18:23:55 -08:00
Paul Yang
fe1790ca0d
Fix Multiple Request for PHP (#7008)
* Add scripts to test multirequest

* chmod ug+x multirequest.sh

* Add continuous test

* Compile c extension

* Class entry is obsolete in the second request
1) Needes to use class name in persistent map
2) Invalidate class entry stored in descriptor

* Add new files to dist

* Fix compile_extension

* Cleanup outputs for phpize
2019-12-12 13:59:51 -08:00
Jan-Gerd Tenberge
8baf3a4398 Add generate_descriptor_proto.sh output 2019-12-11 11:43:55 -08:00
Jan-Gerd Tenberge
e3ebf0c7e1 Add explicit cast to silence clang warning
Clang currently displays an error if source files generated with protoc are compiled with -Wcomma. This change fixes this as suggested by the compiler itself.
2019-12-11 11:43:55 -08:00
Rafi Kamal
39492b68d8
Update protobuf version to 3.11.2 (#7004) 2019-12-10 17:50:28 -08:00
Thomas Van Lenten
065fa2f395 Remove use of VLA.
VLAs complicate static analysis and bloat stack size. Replace VLA allocation
with calls to malloc and free.  This will alos the code to build with -Wvla.
2019-12-10 17:31:25 -05:00
William A Rowe Jr
53a814a0ee Treat F5-FF octets as single (invalid) characters
This corresponds to the newest reading of RFC 3629, and results
in the largest possible number of character entities by any
valid parser. This may result in a buffer which is oversized,
but never undersized.

This is after further discussion with acozzette in this PR;
https://github.com/protocolbuffers/protobuf/pull/6844

Signed-off-by: William A Rowe Jr wrowe@pivotal.io
Signed-off-by: Yechiel Kalmenson ykalmenson@pivotal.io
2019-12-10 13:35:38 -08:00
William A Rowe Jr
961c0e6b86 Correct interpretation of utf-8 0xf8-0xff
In consuming this useful string utility, it was discovered
that the interpretation of leading byte codes 0xf8-0xff
did not conform to either the RFC 3629 nor ISO/IEC 10646
definitions of utf-8.

The IETF RFC describes only 1-4 byte encodings (a limited
number of 4 byte encodings at that), and plainly states in
section 1. Introduction;
   o  The octet values C0, C1, F5 to FF never appear.

Alternately, the ISO definition "R.2 Specification of UTF-8"
preseented in the original IETF RFC 2279 clearly define the
meaning of leading byte values F5 through FD, and RFC 3629
Section 10. Security paragraph 3 calls out this alternate
reading (alterative to "never appears".) F5-F7 begin an
invalid (in the domain of unicode code points) 4-byte UTF-8
sequence (similar to F0-F4), while F8-FC begin a 5-byte
sequence, FC and FD begin a 6 byte sequence.

The curent code is wrong in that it doesn't treat the codes
F8-FF as invalid 1-byte characters, nor does it treat the
codes F8-FD as the correct number of bytes. No valid parser
will land these lead characters 4 bytes forward. Most will
treat these as the 5 or 6 byte utf-32 character and may then
treat the resulting character as invalid, while some parsers
may reject all leading F5-FF characters as a single byte of
erronious input, followed by each invalid continuation byte.

We propose the conventional reading of F8-FD as 5 and 6 byte
sequences as originally defined, while FE-FF must be read
as single byte invalid code points.

Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
2019-12-10 13:35:38 -08:00
summerCol
6d087c256c fix typos in benchmarks/README.md 2019-12-10 11:32:44 -08:00
Yannic
4447fcc16f Add --<lang>_opt flag for all built-in generators
Plugins (and some built-in generators) have `--<lang>_opt` flag that
allows passing parameters one-by-one instead of passing them as
`--<lang>_out=<params>:<out_base>`. This PR changes protoc to
allow using `--<lang>_opt` for all (built-in) generators.
2019-12-10 11:26:51 -08:00