Commit Graph

9312 Commits

Author SHA1 Message Date
Oleg Kolesov
fe87de31bf
#9293 - incompatible return type php 8.1 (#9301)
* #9293 - fix Missing function's return type declaration (incompatible return type php 8.1)

* #9293 - remove return type void for compatible with php 7.0

* #9293 - add todo for mixed return type

Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-11 11:19:12 -08:00
Deanna Garcia
e760984a59 First try 2022-02-11 19:13:07 +00:00
Anthony Dmitriyev
2ce9604227
Use rb_obj_class instead of CLASS_OF in Ruby C to ignore singleton classes (#9342)
Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-11 11:04:10 -08:00
BartH
2495d220fa
Added Embedded Proto to options.md to reserve the extenion number for the custom options. (#9493) 2022-02-11 08:08:25 -08:00
Deanna Garcia
c946f0bb70 Merge branch 'master' of github.com:protocolbuffers/protobuf into ktExport 2022-02-10 18:20:35 +00:00
Brent Shaffer
ce57b5bab6
fix: [PHP] add missing reserved classnames (#9458)
* fix: add missing reserved classnames

* Try to remove PARENT and SELF from reserved constants

* add back for tests

* add to validConstantNames

* update kReservedNamesSize
2022-02-10 09:16:20 -08:00
David Supplee
dfcbdb8ca0
fix: use E_USER_ERROR for trigger_error calls (#9462)
* fix: use E_USER_ERROR for trigger_error calls

* fix: use E_USER_ERROR for trigger_error calls
2022-02-10 09:03:34 -08:00
Adam Cozzette
d5ef16c6eb
Ruby: rename max_recursion_depth to recursion_limit (#9486)
This will help keep the terminology consistent with the other language
implementations.
2022-02-09 10:21:13 -08:00
Elliotte Rusty Harold
9748e4c52c
add Eclipse metafiles (#9485) 2022-02-09 12:19:33 -05:00
Lukas Fittl
fbe6ab2487
[Ruby] Message.decode/encode: Add max_recursion_depth option (#9218)
* Message.decode/encode: Add max_recursion_depth option

This allows increasing the recursing depth from the default of 64, by
setting the "max_recursion_depth" to the desired integer value. This is
useful to encode or decode complex nested protobuf messages that otherwise
error out with a RuntimeError or "Error occurred during parsing".

Fixes #1493

* Address review comments

Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-09 08:44:12 -08:00
Timo Lange
4ed3941e27
[CMake] Allow custom plugin options e.g. to generate mocks (#9105)
* add plugin options

* refactored comment message

* added tabs for better readability

* removed newlines as they are not working properly

* allow PROTOC_OPTIONS and EXPORT_MACRO in parallel for protobuf_generate
2022-02-09 08:21:45 -08:00
Joshua Haberman
ce731e2f52
Merge pull request #9482 from haberman/sync-stage
Integrate from Piper for C++, Java, and Python
2022-02-09 00:14:43 -08:00
Joshua Haberman
73f772b666 Added AniesTest.kt to Makefile.am. 2022-02-08 23:28:10 -08:00
Joshua Haberman
09b2c6a2b4 Removed conflicting/redundant variable declaration. 2022-02-08 23:07:12 -08:00
Joshua Haberman
5c5cd186b0 Added missing Kotlin file to EXTRA_DIST. 2022-02-08 23:06:55 -08:00
Joshua Haberman
fb9f5862d3 Fixed JavaScript conformance test and failure list. 2022-02-08 23:06:32 -08:00
Joshua Haberman
b175176124 Added changelog entries. 2022-02-08 21:01:46 -08:00
Joshua Haberman
06196e9b4c Merge tag 'refs/tags/sync-piper' into sync-stage 2022-02-08 20:53:32 -08:00
Joshua Haberman
dce403a8b3 Sync from Piper @427369078
PROTOBUF_SYNC_PIPER
2022-02-08 20:53:31 -08:00
Joshua Haberman
2d69d44cc1
Merge pull request #9479 from haberman/sync-stage-2
Integrate from Piper for C++, Java, and Python
2022-02-08 20:47:40 -08:00
Joshua Haberman
53d409ca54 Removed redundant/unnecessary variable definition. 2022-02-08 20:03:11 -08:00
Joshua Haberman
5aacba062b Resolved remaining conflict markers. 2022-02-08 18:38:48 -08:00
Joshua Haberman
42e806fbf2 Merge branch 'master' into sync-stage-2 2022-02-08 18:36:24 -08:00
Joshua Haberman
301d315dc4
Dropped support for Python < 3.7 (#9480)
* Drop Python versions <3.7.

* Updated README to clarify that Python 3.7 is the minimum.

* Removed more Python 3.5-specific code.

Also changed tests to skip missing interpreters.

* Invoke tox directly instead of through Python.

Hopefully this will pick up python3.

* Updated java_stretch image to bullseye to get Python >= 3.7.

* Use jdk11 instead of jdk8.

* Installed python2 for gtest.

* Use "python3 -m venv" instead of "virtualenv."

* Install python3-venv.
2022-02-08 18:31:50 -08:00
Joshua Haberman
f739286b1a For GCC < 4.9.0 use ::max_align_t instead of std::max_align_t. 2022-02-08 10:31:54 -08:00
Dimitris Koutsogiorgas
b5ab0b7a18 objective-c: Add objc_class_prefix generation option. 2022-02-08 08:22:51 -05:00
Florin Crișan
9ebb31726c
Add option to use external GTest in CMake (#8736)
If `-Dprotobuf_USE_EXTERNAL_GTEST=ON` is passed to CMake, it will use an external Google Test copy (i.e. by calling `find_package(GTest REQUIRED)`) rather than the one provided as a submodule.

This makes sense for larger projects that might already include Google Test and want to use a more standard CMake approach.

Also updated build instructions with this information, and more idiomatic usage.

Co-authored-by: Adam Cozzette <acozzette@google.com>
2022-02-07 20:41:29 -08:00
Florin Crișan
18c951efb1
Enable testing via CTest (#8737)
Convenience feature: enable users to test via the familiar `ctest` command rather than making the `check` target.

They would be able to use the familiar CMake pattern:
```
cmake -S source/protobuf -B build/protobuf ...
cmake --build build/protobuf
ctest --test-dir build/protobuf
cmake --install build/protobuf
```

This is a follow-up to 9f447fc9d3da93da29b8301f1a8ca57b1ea812d7
2022-02-07 17:38:38 -08:00
appledragon
5a0887fc65
for ios shared library export api visibility (#9160)
* for ios shared library export api visibility

* for shared library export api visibility

* for shared library export api visibility
2022-02-07 15:50:16 -08:00
Deanna Garcia
7f474c6c64 Change gcc version 2022-02-07 19:49:23 +00:00
Joshua Haberman
3ea30d8084
Merge pull request #9307 from owent-contrib/fix_9306
[CMAKE] `protobuf::libprotoc` and `protobuf::protoc` should be optional in legacy `protobuf-module.cmake` when crossing compiling.
2022-02-04 09:38:25 -08:00
Elliotte Rusty Harold
867436c0b8
add test for clone of non-empty message (#9193)
* add test for clone

* use var

* reorder
2022-02-04 16:54:43 +00:00
Deanna Garcia
c8b388a6cb Fixing java test 2022-02-04 00:23:34 +00:00
Deanna Garcia
8dc77b9957 Fix more tests 2022-02-03 20:46:48 +00:00
Deanna Garcia
5e0fc2f1df Fix java tests 2022-02-03 18:02:13 +00:00
Phil Clay
3be46483ba
Resolve more java field accessor name conflicts (#8198)
* Remove javanano from .gitignore.
Ignore java/lite/target

* Resolve more java field accessor name conflicts.

Previously, some proto field names would cause the java code generator to generate accessor names that conflict with method names from the message super classes/interfaces.
A list of field names that cause such conflicts previously existed, but the list did not contain every field name that would cause a conflict.
Additionally, only snake_case field names would be detected. If the field name was in camelCase, the conflict would not be detected.

This change adds the complete set of field names that will cause assessor name conflicts, and detects conflicts in both snake_case and camelCase field names.

Fixes #8142

* Prevent java accessor name conflicts for fields with leading underscores.
Previously, some protobuf field names beginning with leading underscores (e.g. _class) would cause uncompilable java code to be generated due to assessor name conflicts.
Now, non-conflicting java accessor method names are created for those fields

* Improve comments/documentation for conversion from snake case to camel case
Rename snakeCaseToCamelCase to snakeCaseToLowerCamelCase
Add snakeCaseToUpperCamelCase
Add clarifying in-line comments for field name generation
Remove explicit version numbers from references.

* Fix indents and typo

* Unnest <pre> tag

* improve grammar in comments
are colliding -> collide

* Remove ternary operator and improve comments

* Fix typo in comment
2022-02-03 12:49:57 -05:00
Nipunn Koorapati
937b56f57b
Match service argument names to abstract interface (#9418)
The base class/documentation suggest that the argument
names are `self` and `done`, while the runtime used
argument names `srvc` and `callback`.

`mypy.stubtest` was able to identify this - as it compares
the types (autogenerated by
[`mypy-protobuf`](https://github.com/dropbox/mypy-protobuf/))
to the actual code generated by protoc at runtime.

Since the stubs assume the generated code matches the abstract
interface in service.py - it saw these differences.
2022-02-03 09:14:44 -08:00
Deanna Garcia
ab2593041d Merge branch 'sync-stage' of github.com:deannagarcia/protobuf into sync-stage 2022-02-03 01:09:33 +00:00
Deanna Garcia
369388b472 More test fixes. 2022-02-03 01:09:18 +00:00
Deanna Garcia
b2ff4f82c2 Fixing tests 2022-02-03 01:05:20 +00:00
deannagarcia
fa4ba87aff
Merge branch 'master' into sync-stage 2022-02-02 15:24:33 -08:00
Stephen Kennedy
8495372e1e
[cleanup] Msvc warnings (#9263)
* Fix and reenable signed/unsigned warning C4018

* Only disable unary minus warning C4146 in tests
2022-02-02 15:10:15 -08:00
Deanna Garcia
2d87ce3cfe Fix test 2022-02-02 23:10:04 +00:00
Deanna Garcia
a2f7cfab27 Fixing more tests 2022-02-02 22:21:04 +00:00
Joshua Haberman
8c8fb0ec97
Merge pull request #9370 from brettmc/bugfix/php-8.1-deprecations
fixing php 8.1 deprecation warnings
2022-02-02 14:17:43 -08:00
Deanna Garcia
7dff52929f Fixing tests 2022-02-02 21:08:44 +00:00
Deanna Garcia
000da39ada Fix python tests 2022-02-02 19:21:42 +00:00
Deanna Garcia
d2ca349c2a Fix python tests 2022-02-02 18:48:58 +00:00
Deanna Garcia
e56d6936f3 Fix spelling 2022-02-02 18:35:49 +00:00
JCooky
55645ca513
Add cmake option protobuf_INSTALL for installation files (#7123) 2022-02-02 08:29:25 -08:00