Commit Graph

8468 Commits

Author SHA1 Message Date
Joshua Haberman
3d51eb5d9f Make the Ruby DSL use a unique filename for each implicit file. 2021-08-02 20:43:43 -07:00
Joshua Haberman
c5960fdcf5 Removed PHP support for third_party/wyhash in favor of ABSL wyhash. 2021-08-02 15:36:53 -07:00
Joshua Haberman
9d578a3a9c Ported Ruby to ABSL wyhash. 2021-08-02 15:32:01 -07:00
Joshua Haberman
88e6a36562
Merge pull request #8850 from haberman/rubybuilder
Move DSL implementation from C to pure Ruby
2021-08-02 14:50:35 -07:00
Joshua Haberman
b7ab6255d6 Addressed PR comments. 2021-08-02 12:59:49 -07:00
Joshua Haberman
d339e1748e Updated Ruby 3.0 test to 3.0.2. 2021-08-01 12:07:15 -07:00
Matt Fowles Kulukundis
79370f1ffa
Merge pull request #8844 from fowles/master
remove various broken build status tags
2021-08-01 10:30:40 +03:00
Joshua Haberman
2538273fee Add new file to Makefile.am. 2021-07-31 13:13:45 -07:00
Joshua Haberman
cb649b61e3 Fix for newer Rubies where you cannot #force_encoding on a frozen string. 2021-07-31 13:12:14 -07:00
Joshua Haberman
e2360d768f Put the raw descriptor data after __END__ in the Ruby source. 2021-07-31 12:18:34 -07:00
Joshua Haberman
275eac2a95 Merge branch 'master' into rubybuilder 2021-07-31 11:13:37 -07:00
Joshua Haberman
16e16eb8cd pure-Ruby DSL is passing all tests! 2021-07-31 11:13:08 -07:00
Joshua Haberman
b4b5c89c31 Merge branch 'master' into rubybuilder 2021-07-30 15:04:53 -07:00
xidang
914c6fe101
Fix #8748 tests.exe link failure under mingw/mingw64 (#8751) 2021-07-30 09:04:40 -07:00
Yuriy Chernyshov
7326b571d2
Fix undefined symbol error around SharedCtor() (#8827)
* Fix undefined symbol error around SharedCtor()

Apparently, #8532 was incorrect if applied to 3.17.x branch.

3.17.x changed code generation to mark `SharedCtor()` and `SharedDtor()` as inline in .pb.cc.

It looks like we have a compile-time undefined behavior in C++ now. As cppreference.com [says](https://en.cppreference.com/w/cpp/language/inline):

_The definition of an inline function <...> must be reachable in the translation unit where it is accessed (not necessarily before the point of access)._

As protobuf allows custom plugins to generate custom code, there is no limitation on where SharedCtor couble be possible referenced from. In our case we have SharedCtor invoked from corresponding `.pb.h` code, thus triggering:
```
ld: error: undefined symbol: package::Message::SharedCtor()`
>>> referenced by file.pb.h:$$$$
```

If this patch is not applicable, I can take a look into changing the code generation, but doing this will be harder then removing _inline_.

* Regenerate checked-in generated .pb.cc files
2021-07-29 14:05:00 -07:00
Matt Kulukundis
d835808b7a remove various broken build status tags 2021-07-29 10:14:29 -04:00
deannagarcia
53365065d9
Merge pull request #8821 from georgthegreat/patch-1
Fix some -Wunused-parameter warnings in cpp_helpers.h
2021-07-26 15:19:43 -07:00
deannagarcia
81cda3dfd1
Merge pull request #8832 from busunkim96/patch-1
Add syntax highlighting and fix Ruby and Python comment syntax
2021-07-26 15:19:00 -07:00
Andrew Parmet
18b1b21aba
update protokt options reference (#8834) 2021-07-26 11:11:02 -07:00
Bu Sun Kim
6e0a456c77
Fix comment syntax for Ruby and Python 2021-07-20 17:58:29 -06:00
Bu Sun Kim
c9baf39caa
Add syntax highlighting for code blocks 2021-07-20 17:50:27 -06: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
Yuriy Chernyshov
f2effd8c67
Fix some -Wunused-parameter warnings in cpp_helpers.h 2021-07-16 13:18:52 +03: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