Commit Graph

8481 Commits

Author SHA1 Message Date
Adam Cozzette
1a024e8e36 Tweak brace initialization in descriptor.cc 2021-08-04 15:09:26 -07:00
Adam Cozzette
6cee7c604e Temporarily disable ExtensionRegistryFactoryTest 2021-08-04 14:34:53 -07:00
Adam Cozzette
0a4fcd5d97 Fix memory leak in InlinedStringField 2021-08-04 12:48:14 -07:00
Adam Cozzette
e4fb604bc1 Use pipe instead of pipe2 for compatibility with Mac OS 2021-08-04 08:31:56 -07:00
Adam Cozzette
64e9f1b5c7 Add an extra pair of braces around constexpr std::array 2021-08-04 07:41:13 -07:00
Adam Cozzette
2fd5c96f4d Add map_test.inc to build configs and new Kotlin files to java_EXTRA_DIST 2021-08-03 14:13:43 -07:00
Adam Cozzette
d46abc1e7e Update BUILD and cmake files and add some missing Java dependencies 2021-08-03 13:44:26 -07:00
Adam Cozzette
f56438cb62 Update CHANGES.txt 2021-08-03 12:57:50 -07:00
Adam Cozzette
e1930cd028 Fix unused parameters in cpp_helpers.cc 2021-08-03 12:40:01 -07:00
Adam Cozzette
5d03f8c8a5 Merge tag 'refs/tags/sync-piper' into sync-stage 2021-08-03 12:25:42 -07:00
Adam Cozzette
562fc946c7 Sync from Piper @388508285
PROTOBUF_SYNC_PIPER
2021-08-03 11:58:05 -07:00
SpringHack
343f778572
Fix default value of enum(int) in json_util with proto2 (#8835) 2021-08-03 09:53:23 -07:00
Joshua Haberman
d13afed563 Revert "Removed obsolete file from Makefile.am."
This reverts commit e9b368655a.
2021-08-02 20:47:40 -07:00
Joshua Haberman
ddda90d29c Revert "Make the Ruby DSL use a unique filename for each implicit file."
This reverts commit db12f11466.
2021-08-02 20:47:36 -07:00
Joshua Haberman
e9b368655a Removed obsolete file from Makefile.am. 2021-08-02 20:39:33 -07:00
Joshua Haberman
db12f11466 Make the Ruby DSL use a unique filename for each implicit file. 2021-08-02 20:38:53 -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