Commit Graph

8447 Commits

Author SHA1 Message Date
Joshua Haberman
b4b5c89c31 Merge branch 'master' into rubybuilder 2021-07-30 15:04:53 -07:00
Adam Cozzette
d662ec9c2e
Update the automake and Bazel configs to be consistent about field_access_listener.cc (#8823)
In an earlier change I moved field_access_listener.cc from the lite
runtime to the full runtime in the CMake configuration, but this caused
//:build_files_updated_unittest to start failing because it expects all
three build systems to be consistent. To fix that, I updated the
Automake configuration and then ran ./update_file_lists.sh to propagate
that change to the other configs.
2021-07-16 12:26:09 -07:00
Derek Perez
b90ec9c242
updating caliper to latest maven version. (#8813)
Fixes #8665
2021-07-13 15:58:40 -07:00
Damon Cai
a420f23d4c
Remove JvmField annotations from Kotlin private properties (#8804) (#8811) 2021-07-13 15:25:00 -07:00
Yuriy Chernyshov
7b1f7938bc
Support arena allocation of google::protobuf::AnyMetadata (#8758) 2021-07-12 11:47:03 -07:00
Thomas Van Lenten
4b3da9f618 Revert "Add option for eliding property metadata from messages"
This reverts commit ca3674b7d5.

While there are savings, it ends up being to easy/common to run into issues with
AppStore validation since the selector usage now appears to be a possible match
for private apis vs. for selectors/properties in the generated code.
2021-07-12 09:47:16 -04:00
Thomas Van Lenten
378238eae8 Add some knobs tweak what is generated.
These aren't "official" options and could changed/removed in the future, and
that wouldn't be considered a breaking change.
2021-07-09 17:19:52 -04:00
Yuriy Chernyshov
cda795437d
Remove deprecated version of SetTotalBytesLimit() (#8794)
* Remove deprecated version of SetTotalBytesLimit()

It has been depcated for at least 3 years.
Worst (backward incompatible) things happened during this period.

I think this method could be safely removed, as the client code fix is trivial.

* Fix coded_stream_unittest.cc
2021-07-09 14:07:36 -07:00
Brent Shaffer
2126123b53
PHP: add new keywords to missing test (#8801) 2021-07-08 12:54:08 -07:00
Florin Crișan
0444e07dc9
Fix #7047 Safely handle setlocale (#8735)
* fix #7074 Safely handle setlocale

`setlocale` returns a pointer to a buffer containing the current locale name.
This needs to be copied into a `std::string` or it will be overwritten by the next call.

Trying to call `setlocale` with a non-null, invalid pointer can have unpredictable results, such as
```
[ RUN      ] StringPrintfTest.Multibyte
minkernel\crts\ucrt\src\appcrt\convert\mbstowcs.cpp(246) : Assertion failed: (pwcs == nullptr && sizeInWords == 0) || (pwcs != nullptr && sizeInWords > 0)
```

`setlocale` can also return a `nullptr` if it fails, but we assert against that.

* stringprintf_unittest.cc: Replace `new char[n+1]` with `std::array`

Prefer safer alternative to naked pointers.

This is a follow-up to 1dd313cd0611ac13257c075a977d46c874c42652
2021-07-08 11:14:49 -07:00
c-parsons
d652d8059c
Update rules_jvm_external to 4.1 (#8800) 2021-07-08 09:05:05 -07:00
Damien Neil
3588a77a86
field_presence.md: fix Go example (#8788)
Go generated code does not have Has methods.

Remove extraneous parentheses and semicolons.
2021-07-07 17:22:34 -07:00
Brent Shaffer
d2c82dff39
fix: missing comma in PHP names.c and generator.cc (#8787)
* Update names.c

* Update php_generator.cc
2021-07-07 13:02:34 -07:00
Thomas Van Lenten
4b77b73369 ObjC: Fix logic error in exception loading. 2021-07-01 12:16:39 -04:00
Thomas Van Lenten
e60ec85b9f Allow suppression of objc prefix checks.
- Accept "-" as the expected prefixes file and turn off all validations of
  prefixes (even the Apple conventions).
- Reflow some of the prefix checks to hopefully make things a little easier
  to follow.
- Don't print warnings about updates to the expected prefix file until there is
  a file.
2021-06-30 12:51:05 -04:00
Matt Fowles Kulukundis
9087da2b7c
Merge pull request #7268 from bshaffer/patch-2
PHP: Adds "finally", "fn", "match", and "yield" to reserved names
2021-06-29 13:00:01 -04:00
Brent Shaffer
d995c1c182 update counts 2021-06-29 09:17:25 -07:00
Brent Shaffer
bade043986 update reserved names: add finally, fn, match, yield 2021-06-29 07:56:08 -07:00
Adam Cozzette
336ed1820a
Move field_access_listener from libprotobuf-lite to libprotobuf (#8775)
This should fix #8768. The field access listener code can't build
successfully as part of protobuf-lite because it relies on descriptors.
2021-06-28 16:07:28 -07:00
Derek Perez
c684434ecb
creating a single target to rollup maven artifacts (#8776) 2021-06-28 14:38:25 -07:00
Derek Perez
5df472af15
use our java tests target instead of recursive walk (#8777) 2021-06-28 14:31:56 -07:00
Marcel Lanz
01ac995c94
I've requested a block of 5 extension numbers. We already have two concrete extensions that we need ids for. Our project is under active development and we can imagine a number of other extensions that we will want in future, so we thought we'd start by registering a block of 5, instead of raising a new PR here each time we need a new one (#8772) 2021-06-28 11:52:54 -07:00
Arthur O'Dwyer
ed8b2e6f62
Stop using std::iterator (deprecated in C++17). (#8741) 2021-06-28 11:46:00 -07:00
deannagarcia
09b8ade1d5
Merge pull request #8770 from deannagarcia/updateBzlVersion
Adding protobuf_version.bzl to update_version.py
2021-06-28 10:40:17 -07:00
Ilya Konstantinov
991bcada05
Raise ParseError when JSON string is expected and not given (#7935)
Raise ParseError when JSON string is expected and not given
2021-06-27 06:57:47 +08:00
Deanna Garcia
66d26f3fe6 Adding protobuf_version.bzl to get updated version in python script 2021-06-25 21:07:31 +00:00
deannagarcia
611a08ee00
Merge pull request #8752 from deannagarcia/rulesJvmExternal
Create java_export targets
2021-06-25 13:49:30 -07:00
Derek Perez
9276968326
Detect Windows vs Non-Windows execution context in tests. (#8767) 2021-06-25 12:55:11 -07:00
deannagarcia
318a48ac25
Merge pull request #8762 from deannagarcia/fixUtilBug
Fix failing java7 linux test
2021-06-25 10:13:43 -07:00
Deanna Garcia
1e8457f8f8 Adding util tests 2021-06-24 22:06:55 +00:00
Dave MacLachlan
3fd4d3fe8e Fix up objectivec sources to simplfy import into Google. 2021-06-24 17:46:51 -04:00
Thomas Van Lenten
cf12bffd9d [ObjC] Add support for using the proto package to prefix symbols.
This likely should have been the default from the start, as without it is way to
common to get symbol collisions between different proto files. It would be nice
to support a "migration" mode where both names are created to aid it moving code
to this model, but with ObjC `@class` decls being very common to avoid header
imports to control rebuilds/etc., it doesn't work as an `@class` usage will
error if one also uses `@compatibility_alias`. Falling back to `#define` the two
together also doesn't work as the header with the `@class` will cause methods to
get defined with one interface, but when methods taking those types are define
will likely #import the generate header and thus get the define and end up with
a different signature. So for now, there is no migration support and code has to
be updated in one shot with enable the new prefixing.

- Add a generation option to enable this change in generation.
- Add a second generation option to provide a list of proto package that are
  exceptions from using the proto package. This allows easier
  migration/updating of code one package at a time.
2021-06-24 16:09:41 -04:00
Deanna Garcia
41e89c7d5c Don't test kotlin if not in jdk8 2021-06-24 18:21:49 +00:00
Derek Perez
2ea5c9951c
Fix for WIndows Bazel CI (#8761) 2021-06-24 10:58:39 -07:00
Dave MacLachlan
ca3674b7d5 Add option for eliding property metadata from messages
Adds an option to protoc `--objc_opt=elide_message_metadata` to remove all the property
metadata from message classes. This significantly reduces the codegen size of the clases.
The downside is that iterating through properties using objective c runtime calls will no
longer function. This is mitigated by the fact that most (all?) of the information that
folks are interested in can be extracted via the message descriptor.

We do this by defining our own classes using the `GPB_MESSAGE_SUBCLASS_IMPL` macro.
2021-06-23 14:23:23 -04:00
Jie Luo
e7440d2f13
Install python38/39 on windows (#8757)
Create install_python_interpreters.ps1
Install python38/39 on windows
2021-06-23 13:40:30 +08:00
Derek Perez
91bbdc90e3
Ensure testdata text always uses \n newlines. (#8756) 2021-06-22 11:48:33 -07:00
Deanna Garcia
c02b5824d0 Adding new pom template files to Makefile. 2021-06-22 17:04:03 +00:00
Derek Perez
e9ffe09c8f
avoid using Bazel latest. (#8753) 2021-06-22 09:35:30 -07:00
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
Adam Cozzette
aedf4e6316
Remove TimeUtil.java and TimeUtilTest.java from Makefile.am (#8750)
This should fix the failing distcheck test.
2021-06-18 16:58:40 -07:00
Derek Perez
9d9d8ee18d
Removing deprecated TimeUtil class. (#8749) 2021-06-18 12:30:27 -07:00
Jan Tattermusch
2af13f077a
Merge pull request #8746 from jtattermusch/reintroduce_python_aarch64
Reintroduce setup.py changes from #8280 erased by piper import #8617
2021-06-18 19:12:15 +02:00
Dave MacLachlan
9b3aaf4bc5 Block deprecated warnings when testing on newer OS
Some of the test methods we use are deprecated on newer OS. This just gets prevents the
warning that we don't actually care about.
2021-06-18 09:58:18 -04:00
Jan Tattermusch
f4360f0a89 reintroduce setup.py changes from #8280 erased by piper import #8617 2021-06-18 12:38:47 +02:00
Jan Tattermusch
071b1612b2
Merge pull request #8740 from kiwidev/master
[csharp] ByteString.CreateCodedInput should use ArraySegment offset and count
2021-06-18 10:36:21 +02:00
Mark Young
9848fe2bf7 [csharp] ByteString.CreateCodedInput should use ArraySegment offset and count
CreateCodedInput is created from the underlying array behind the ByteString.
If this was created from a larger array (via Memory<byte> or ArrayPool etc)
then the CodedInput refers to the wrong section of memory.

Change is to add the offset and count like the other methods that use the
ArraySegment (ToString, ToBase64, WriteTo).
2021-06-18 11:52:53 +12:00
Thomas Van Lenten
18d980f380 Change 'Sur' to 'sur' to see if that works 2021-06-17 16:36:33 -04:00