Commit Graph

7416 Commits

Author SHA1 Message Date
Joshua Haberman
27ba0c5bb0
Fixed the PHP Kokoro build. (#7503)
* Fixed the PHP Kokoro build.

* Renamed all PHP7.4 Mac tests -> PHP7.3.
2020-05-13 15:36:21 -07:00
Jan Tattermusch
440a156e1c
Merge pull request #6904 from erikma/dev/erikmav/byteStringMemory
C#: Allow readonly view of byteString's data with ByteString.Memory property
2020-05-13 15:44:01 +02:00
Joshua Haberman
f945fdf2d9
Merge pull request #7497 from haberman/merge-312-branch
Merge 3.12.x branch to master after 3.12.0-rc2
2020-05-12 18:53:50 -07:00
Joshua Haberman
62ab8333c9 Merge branch '3.12.x' into merge-312-branch 2020-05-12 16:59:55 -07:00
Joshua Haberman
7e7777e8a1
Merge pull request #7495 from dsnet/master
Fix integration tests for Go examples
2020-05-12 15:05:23 -07:00
Joe Tsai
654edd8e74 Fix integration tests for Go examples
A proper integration test should be hermetic such that its operation
is agnostic to whatever happens outside of its controlled environment.
The script is not so since it uses a fixed (and very old) version of Go,
but continues to build protoc-gen-go from head, leading to an eventual
breakage when protoc-gen-go at head no longer operates on such an old
version of Go.

Fix the script to pin to an older version of protoc-gen-go (i.e., v1.3.5).
2020-05-12 14:47:54 -07:00
Joshua Haberman
8053525846 Updated Changelog for 3.12.0-rc2. 2020-05-12 14:39:14 -07:00
Joshua Haberman
73e48b4fb0
Merge pull request #7494 from haberman/3.12.x-202005121247
Update protobuf version to 3.12.0-rc2
2020-05-12 13:38:38 -07:00
Joshua Haberman
f597a24627 Update protobuf version 2020-05-12 12:49:46 -07:00
Joshua Haberman
51199fcba2
Merge pull request #7491 from haberman/cherry
Cherry-pick fixes onto 3.12.x branch for 3.12.0-rc2
2020-05-12 12:45:16 -07:00
Joshua Haberman
01e8c0fa34 Cherry-pick the fix to #7480 from #7485. 2020-05-12 11:34:02 -07:00
Joshua Haberman
c0b1ce00f3 Cherry-pick the fix for https://github.com/protocolbuffers/protobuf/issues/7463. 2020-05-12 11:06:05 -07:00
Jon Skeet
3c3646fa78 Implement HasPresence for C#
FieldDescriptor.HasPresence returns true if both ClearValue and HasValue (on the accessor) can be expected to work. Some fields have a working ClearValue, but no HasValue; HasPresence returns false for those fields.

Generally:

- Extension fields have presence if and only if they're singular
- Repeated fields do not support presence
- Map fields do not support presence
- Message fields support presence
- Oneof fields support presence (this includes synthetic oneof fields, so that covers proto3 optional singular fields)
- Proto2 singular primitive fields support presence
- Proto3 singular primitive fields do not support presence (unless they're in a oneof, covered above)
2020-05-12 10:58:05 -07:00
Jan Tattermusch
fc5ded36bc Merge pull request #7434 from jtattermusch/csharp_expose_options
C#: Get rid of broken GetOption API and expose the "GetOptions()" method on descriptors instead
2020-05-12 10:56:51 -07:00
Jon Skeet
807ea2f352 Fix to C# support library code
(This was the only use of a HasXyz property for a message type.)
2020-05-12 10:54:45 -07:00
Jon Skeet
13df985bff Regenerate C# code based on the previous commit
(This removes the Has/Clear members for message types in proto2.)
2020-05-12 10:54:45 -07:00
Jon Skeet
6a84e31818 Don't generate Has/Clear members for proto2 message fields.
This is a breaking change in terms of proto2 code generation: users who were previously using these members will have to change to null checks for message fields.
After toying with removing Has/Clear for proto2 oneof fields, I've left them alone in this commit, for consistency with other languages. The inconsistency between proto2 and proto3 won't come up here, because proto3 oneof fields can never be explicitly optional.

Fixes #7395.
2020-05-12 10:54:45 -07:00
Joshua Haberman
acbdca9a20
Merge pull request #7485 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2020-05-11 21:35:30 -07:00
Joshua Haberman
cb390216cf Fixed the Java build. 2020-05-11 20:29:41 -07:00
Joshua Haberman
086167b460 Merge branch 'master' into sync-stage 2020-05-11 11:32:03 -07:00
Joshua Haberman
c8e682adca Added new failure to the failure lists. 2020-05-11 11:31:38 -07:00
Michael WERLE
976f85b5d5 Add "WITH_CMAKE" define to allow cross-compiling when using the cmake build system. 2020-05-11 10:19:18 -07:00
David Ostrovsky
6bbd56dfd9 Bazel: Discontinue JDK 7 compatibility support
The primary reason to drop that compatibility is because Bazel is
adding unconditionally -parameters option that is not compatible
with JDK 7. This pollutes the build log with annoying warnings:

  warning: -parameters is not supported for target value 1.7. \
  Use 1.8 or later.

Second reason is that nobody in the wild relies on JDK 7 any more
because it was discontinued years ago.

Also remove JDK9 config_setting rule that is not used any more.

Test Plan:

Build :protobuf_java and confirm, that there are no warnings any more
and that major byte version 52 is produced, that corresponds to Java 8:

  $ bazel build protobuf_java
  $ javap -v -cp bazel-bin/java/core/libcore.jar com.google.protobuf.Any | grep major
  major version: 52
2020-05-11 10:01:00 -07:00
Adam Cozzette
fa9ebaf807 Fixed the cpp_distcheck test 2020-05-11 08:59:35 -07:00
Dave MacLachlan
118589c565 Remove unnecessary call to [self descriptor] in resolveClassMethod:
This was causing problems in OCMock due to recursion when OCMock was trying
to mock a protobuf.

`_forwardStackInvocation:` was being called as part of the resolution of `descriptor`.
2020-05-11 11:31:58 -04:00
Jan Tattermusch
0611563e76
Merge pull request #7448 from jtattermusch/csharp_selfreferential_options
C# Add tests for self-referential options
2020-05-11 13:15:29 +02:00
Jan Tattermusch
0757d8ee5c update Makefile.am 2020-05-11 11:24:48 +02:00
Jan Tattermusch
dd013bdf06 regenerate protos 2020-05-11 11:18:49 +02:00
Jan Tattermusch
661c0c4eb8 add tests for selfreferential options 2020-05-11 11:18:49 +02:00
Jan Tattermusch
bf3eef94c1
Merge pull request #7434 from jtattermusch/csharp_expose_options
C#: Get rid of broken GetOption API and expose the "GetOptions()" method on descriptors instead
2020-05-11 09:40:51 +02:00
Joshua Haberman
3f407ddedf Merge branch 'master' into sync-stage 2020-05-11 00:23:10 -07:00
Joshua Haberman
f9a1f16163 Merge branch 'sync-piper' into sync-stage 2020-05-11 00:12:20 -07:00
Joshua Haberman
6b5fb807c0 Sync from Piper @310858019
PROTOBUF_SYNC_PIPER
2020-05-11 00:12:20 -07:00
Daniel Kurka
bb3460d71b Project import generated by Copybara
PiperOrigin-RevId: 310614231
2020-05-08 13:06:41 -07:00
Leo
12236c6977 Fix typo on py_proto_library 2020-05-08 09:34:26 -07:00
Aleksandr Parfenov
5efd1215f5 Update comment for GetRepeatedFieldRef
Use just reflection.h in documentation instead of full path
2020-05-08 09:27:47 -07:00
Aleksandr Parfenov
b60d9f2d6b Fix include path to reflection.h in documentation
There is a note in the documentation to `Reflection::GetRepeatedFieldRef()`
about file `net/proto2/public/reflection.h` which contains a definition of
`RepeatedFieldRef`. Since there are few places in code with rewrite of
`net...` path to `google/protobuf/...` it looks like the first one is a
legacy path and should be renamed to `google/protobuf` in documentation
as well.
2020-05-08 09:27:47 -07:00
Jon Skeet
6b0ff74ecf Implement HasPresence for C#
FieldDescriptor.HasPresence returns true if both ClearValue and HasValue (on the accessor) can be expected to work. Some fields have a working ClearValue, but no HasValue; HasPresence returns false for those fields.

Generally:

- Extension fields have presence if and only if they're singular
- Repeated fields do not support presence
- Map fields do not support presence
- Message fields support presence
- Oneof fields support presence (this includes synthetic oneof fields, so that covers proto3 optional singular fields)
- Proto2 singular primitive fields support presence
- Proto3 singular primitive fields do not support presence (unless they're in a oneof, covered above)
2020-05-08 06:17:50 +01:00
Joshua Haberman
cac7136436
Merge pull request #7477 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2020-05-07 22:00:22 -07:00
Daniel Kurka
ed596ef68d Project import generated by Copybara
PiperOrigin-RevId: 310497816
2020-05-07 21:53:47 -07:00
Joshua Haberman
c00c60eb1c Added new failures to PHP C lists also (and sorted). 2020-05-07 18:30:47 -07:00
Joshua Haberman
dfff1ac2cf Added new failing conformance test to Ruby, PHP, and C#. 2020-05-07 17:10:11 -07:00
Joshua Haberman
2d80a70048 Sync from Piper @310457838
PROTOBUF_SYNC_PIPER
2020-05-07 16:21:50 -07:00
Joshua Haberman
81c5959e67 Merge branch 'sync-piper' into sync-stage 2020-05-07 16:21:50 -07:00
Joshua Haberman
c781df3d21
Updated generated code for C#. (#7476) 2020-05-07 16:19:28 -07:00
Jan Tattermusch
0688883b52 address review comments 2020-05-06 18:53:36 +02:00
Paul Yang
d001f8cee4
Ignore unknown enum value when ignore_unknown specified (#7455) (#7462) 2020-05-05 18:12:27 -07:00
Joshua Haberman
2ac29ae5d4 Sync from Piper @310014675
PROTOBUF_SYNC_PIPER
2020-05-05 13:56:07 -07:00
Joshua Haberman
204f99488c
Use the name from the descriptor instead of RTTI. (#7465) 2020-05-05 10:56:48 -07:00
Joshua Haberman
7eb207c574
Merge pull request #7464 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2020-05-05 10:56:21 -07:00