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.
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.
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.
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.
* Fixed memory bug: properly root repeated/map field when assigning.
Previously the protobuf extension would not properly root
memory from a repeated field or map when assigning to a
message field (see the attached test case). This could cause
crashes if the repeated field is subsequently accessed.
* Add accidentally-deleted Ruby test.