Commit Graph

8375 Commits

Author SHA1 Message Date
Deanna Garcia
1f1ed9c62f Changing one more instance of VERSION 2021-06-21 23:07:29 +00:00
Deanna Garcia
96cffb3ac3 Removing dependencies and renaming bazel version file 2021-06-21 23:03:51 +00:00
Deanna Garcia
89a9f459e9 Changing BUILD files and adding pom templates 2021-06-21 22:28:17 +00:00
Marc Plano-Lesay
4644980d81
Fix warnings raised by clang 11 (#8664)
This fixes a few kinds of warnings:
 - inconsistent-missing-override when the overriding site is missing the
   override keyword
 - unused-function when a function is neither visible nor used
 - unused-private-field when a private field exists but is never used
 - sign-compare when unsigned ints are compared to signed ints. Not all
   of those have been addressed, but this warning isn't enabled by
   default.

This fixes #8612.
2021-06-07 09:45:27 -07:00
deannagarcia
a1d8f8f969
Merge pull request #8698 from protocolbuffers/3.17.x
Merge 3.17.x into master
2021-06-04 20:04:58 +00:00
Jorge López Fueyo
1ae531d73b
Disabled version.rc for clang-cl (#8139) 2021-06-04 11:13:56 -07:00
deannagarcia
f5a0e3988b
Merge branch 'master' into 3.17.x 2021-06-04 17:22:24 +00:00
Matt Fowles Kulukundis
8d8ba6acc3
Merge pull request #8637 from dschopf/fix-qnx-7.0-support
Fix QNX 7.0 support #8593
2021-06-04 12:53:58 -04:00
Matt Fowles Kulukundis
c05e7ad0a8
Merge pull request #8690 from maxgolov/maxgolov/vs2019_16.10_constinit_broken
constinit not working as expected in Visual Studio 2019 Update 16.10
2021-06-03 17:06:29 -04:00
Jan Tattermusch
439e6cf403
Merge pull request #8666 from jtattermusch/protobuf_fix_result_parser
OSS benchmarks: print benchmarks JSON results to build job log
2021-06-03 19:49:06 +02:00
Elliotte Rusty Harold
7a374d4a2f
deps: update to Guava 30.1.1 (#8521)
@eklitzke
2021-06-03 10:40:17 -07:00
Paul Yang
548e01324e
Merge pull request #8689 from deannagarcia/merge3.17.2
Merge 3.17.x into master
2021-06-03 10:39:39 -07:00
Max Golovanov
bc46fce1bd constinit not working as expected in Visual Studio 2019 Update 16.10 2021-06-02 15:43:50 -07:00
Deanna Garcia
50a317556a Fixing merge conflict 2021-06-02 22:31:51 +00:00
Deanna Garcia
506f2273d1 Merging 3.17.x branch into master 2021-06-02 22:29:40 +00:00
Matt Fowles Kulukundis
b650ea44b1
Merge pull request #8557 from yuzawa-san/osx-m1-fix
protoc maven artifacts: reuse osx-x86_64 for osx-aarch_64
2021-06-02 16:39:38 -04:00
deannagarcia
70db61a91b
Merge pull request #8686 from protocolbuffers/addToChanges
Adding PHP fix to changes for 3.17.2
2021-06-02 09:41:42 -07:00
Deanna Garcia
c26e452e9e Adding PHP fix to changes for 3.17.2 2021-06-02 16:22:31 +00:00
deannagarcia
09cf1839e1
Merge pull request #8685 from protocolbuffers/addDokka
Adding dokka to main pom
2021-06-02 09:16:20 -07:00
Deanna Garcia
7090f7ab55 Adding dokka to main pom 2021-06-01 23:04:16 +00:00
Paul Yang
bd42fcc7a3
Merge pull request #8652 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2021-06-01 15:20:53 -07:00
Kelvin Jin
fd896ba23e
Use modern JS tooling instead of Closure's deprecated Python scripts. (#8610) 2021-06-01 15:17:06 -07:00
Thomas Van Lenten
3069f82bbc Tweak tests to allow common protos to evolve more.
Don't check field counts, instead only test based on the fields that exists (and
likely will never exist). This allows the protos to evolve with almost zero
chance of the tests breaking for those other changes.
2021-06-01 15:10:06 -04:00
Thomas Van Lenten
0dc4ad80d1 Some cpp style fixes. 2021-06-01 13:37:59 -04:00
Yoav Miller
0b05994474
fixed warning about missing pragma warning push (#8678) 2021-06-01 08:59:15 -07:00
Jan Tattermusch
b4a06a193b print benchmarks JSON results to build job log 2021-05-31 11:07:33 +02:00
Jan Tattermusch
0b8d13a1d4
Merge pull request #8665 from jtattermusch/protobuf_fix_benchmark_script
Fix OSS benchmarking script
2021-05-31 11:02:20 +02:00
Matt Fowles Kulukundis
dd247c20ad
Merge pull request #8673 from mrjoel/mrjoel/correct-export-order
Correct ordering of export API for DescriptorTable
2021-05-28 12:54:42 -04:00
Joshua Haberman
b42f2376e4
Merge pull request #8670 from haberman/php-wkt-submsg
Fixed SEGV in sub-message getters for well-known types when message is unset.
2021-05-27 15:36:36 -07:00
Joel Johnson
11edc34d08 Correct ordering of export API for DescriptorTable
This resolves issues with GCC and Clang warning (as error) about
attribute in an unallowed location, in particular when used with a
generated file using a dllexport_decl value of [[gnu::visibility]].

The correct ordering is already used in the compiler in
FileGenerator::ForwardDeclarations() for each of classes_, as well
as for other existing local values in pregenerated files. This
change ensures that all usages can compile without issue.
2021-05-27 13:43:40 -06:00
Thomas Van Lenten
f415285c3e Scope string usage with the namespace. 2021-05-27 14:36:20 -04:00
Thomas Van Lenten
8275756142 ObjC: Add stdin/stdout/stderr to reserved word list.
This will cause fields named exactly these names to get `_p` appended to them.
This is being done since the C89/C99/etc specs say these name should be macros,
so in an ObjC context, trying to access the fields would result in runtime
failures for unknown selectors. The only way the fields were usable was to use
KVC or via the descriptor based apis, but if someone hit that they likely would
have reported the general issue also.
2021-05-27 14:13:32 -04:00
Joshua Haberman
75de6aa21a Fixed sub-message getters for well-known types when message is unset.
The well-known types generate C code into wkt.inc, and this C code was
not testing isset($msg->submsg_field) like the generated code does:

```php
// PHP generated getter: checks isset().
public function getOptions()
{
    return isset($this->options) ? $this->options : null;
}
```

```c
// C generated getter, does not check upb_msg_has()
static PHP_METHOD(google_protobuf_Value, getListValue) {
  Message* intern = (Message*)Z_OBJ_P(getThis());
  const upb_fielddef *f = upb_msgdef_ntofz(intern->desc->msgdef,
                                           "list_value");
  zval ret;
  Message_get(intern, f, &ret);
  RETURN_COPY_VALUE(&ret);
}
```

This led to an error where we wnuld try to get a sub-message field from upb
when it `upb_msg_has(msg, field) == false`, which is an error according to upb.

There are two possible fixes for this bug. A guiding principle is that we want
the generated C code in wkt.inc to have the same behavior as PHP generated
code. Following this principle, the two possible fixes are:

1. Change the code generator for wkt.inc to check upb_msg_has(f) before
   calling Message_get(). This would match the isset() check that the
   The PHP generated code does, and we would leave the PHP code unchanged.

2. Change Message_get() to itself perform the upb_msg_has(f) check for
   sub-message fields. This means that generated code would no longer need
   to perform an isset() check, so we would want to remove this check from
   the PHP generated code also to avoid a redundant check.

Both of these are reasonable fixes, and it is not immediately obvious which is
better. (1) has the benefit of resolving this case when we are in more
specialized code (a getter function that already knows this is a sub-message
field), and therefore avoids performing the check later in more generic code
that would have to test the type again. On the other hand, the isset() check is
not needed for the pure PHP implementation, as an unset PHP variable will
return `null` anyway. And for the C extension, we'd rather check upb_msg_has()
at the C level instead of PHP.

So this change implements (2). The generated code in wkt.inc remains unchanged,
and the PHP generated code for sub-message fields is changed to remove the
isset() check.
2021-05-27 10:45:18 -07:00
Adam Cozzette
d2f6d9b721
Merge pull request #8650 from acozzette/merge-3.17.x
Merge 3.17.x into master
2021-05-27 08:05:54 -07:00
Jan Tattermusch
ceafbf9132 more cleanup 2021-05-27 12:29:29 +02:00
Jan Tattermusch
75afc88eae disable php benchmark and other cleanup 2021-05-27 11:32:50 +02:00
Jan Tattermusch
6135c916a4 fix benchmark run.sh script 2021-05-27 10:30:12 +02:00
Benjamin Peterson
fa31183250
Add internal.bzl to EXTRA_DIST. (#8663)
internal.bzl is required to load java/core/BUILD and java/lite/BUILD, so it must be distributed.
2021-05-26 13:01:46 -07:00
Petr Jediný
3737676d83
Reserve 1109 for Glitchdot (#8662) 2021-05-26 12:19:33 -07:00
Adam Cozzette
4e0a1119c0
Fix the Docker build for our javascript Docker image (#8661)
I noticed that our JavaScript Docker image is a couple years old and
seems to have an old NPM version that may be causing problems on #8610,
so I went ahead and rebuilt the image. To do that successfully, I had to
set some environment variables in the Dockerfile so that it can build
successfully without having to ask for input about timezone
configuration. This seems to be a known issue described here:
https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
I also updated it to explicitly install Python since that is required
for part of our JavaScript build.
2021-05-26 08:56:40 -07:00
deannagarcia
769826e338
Merge pull request #8658 from deannagarcia/update-change-notes
Updating change logs for 3.17.2
2021-05-25 14:08:49 -07:00
Deanna Garcia
a693d723d4 Add PR number for kotlin fix 2021-05-25 21:07:28 +00:00
Deanna Garcia
d303bba1bb Updating change logs 2021-05-25 21:02:52 +00:00
deannagarcia
d3b71f21bb
Merge pull request #8657 from deannagarcia/3.17.x-202105251932
Update version to 3.17.2
2021-05-25 13:47:49 -07:00
Yuriy Chernyshov
b3183b54c4
Use template Delete<> for invoking a dependent template (#8655)
This is a continuation of #8579
2021-05-25 13:27:22 -07:00
Deanna Garcia
5b8208ecea Update protobuf version 2021-05-25 19:36:05 +00:00
Matt Fowles Kulukundis
093824aa0a
Merge pull request #8654 from panmingyang2009/master
[Objective-C] Comment Correcting
2021-05-25 14:28:14 -04:00
deannagarcia
b87d364831
Merge pull request #8653 from deannagarcia/fixDuplicateClassErrors
Remove maven-bundle-plugin to fix duplicate class errors
2021-05-25 10:52:58 -07:00
Deanna Garcia
5fac12fff0 Reverting the Makefile spacing changes 2021-05-25 17:38:17 +00:00
Deanna Garcia
3f8f6e925d Removing more files that were added during rebasing 2021-05-25 17:35:03 +00:00