Commit Graph

92 Commits

Author SHA1 Message Date
Jon Skeet
d7ef9cd2ba Make it easier to follow cmake/README.md instructions
When following the instructions directly (for developing on Windows) we should end up with a generator that's easy to run for csharp/generate_protos.sh, and we shouldn't end up trying to stage the build output.
2022-03-30 16:33:00 +01:00
David L. Jones
75418a54ae Update ignored file paths after renaming. 2022-03-23 18:11:56 -07:00
Adam Cozzette
76398dab31 Sync from Piper @431959314
PROTOBUF_SYNC_PIPER
2022-03-02 17:37:55 +00:00
David L. Jones
1ba1d73e0d Sync from Piper @429333699
PROTOBUF_SYNC_PIPER
2022-02-17 09:53:51 -08:00
Josh Haberman
624d29d833 Sync from Piper @399250367
PROTOBUF_SYNC_PIPER
2021-09-27 19:18:41 +00:00
Elliotte Rusty Harold
7924f6d7ff
same directory ignore
fixes #8745  @acozzette
2021-08-26 17:28:49 +00:00
Adam Cozzette
562fc946c7 Sync from Piper @388508285
PROTOBUF_SYNC_PIPER
2021-08-03 11:58:05 -07:00
Joshua Haberman
b4b5c89c31 Merge branch 'master' into rubybuilder 2021-07-30 15:04:53 -07:00
Deanna Garcia
380e352b0b Sync from Piper @373820256
PROTOBUF_SYNC_PIPER
2021-05-14 17:50:31 +00:00
Adam Cozzette
a4866d34f9 Updated .gitignore to include Kotlin directories 2021-05-12 09:58:30 -07:00
Derek Perez
4008d229aa Sync from Piper @366297034
PROTOBUF_SYNC_PIPER
2021-04-01 18:49:52 +00:00
aaron ai
62c402ae37
Add 'java/lite/target' to .gitignore (#8439) 2021-03-31 11:03:01 -07:00
Deanna Garcia
a00125024e Sync from Piper @353127564
PROTOBUF_SYNC_PIPER
2021-01-22 00:24:30 +00:00
Rob Widmer
48234f5f01 Make the new multi-level ruby tests fit the existing structure better and add them to the makefile 2021-01-14 12:26:04 -08:00
Paul Yang
823f351448
Port for php8 (#8105)
* Port for php8

* Port php c extension for php8

* Update composer.json

* Drop php7.0 support

* Update phpunit for php7.1 in c extension test

* Add back support for php7.0

* Add badge for php8 continuous build
2020-12-04 13:46:34 -08:00
Joshua Haberman
95e6c5b474 Sync from Piper @327110949
PROTOBUF_SYNC_PIPER
2020-08-17 15:26:13 -07:00
Adam Cozzette
58f4260e8e Merged 3.13.x into master 2020-08-17 11:06:11 -07:00
Paul Yang
d4ca92962c
Port php c extension to php8 (#7793)
* Only ported c extension to php8.
* Didn't fixed the issue of throwing warnings for missing arginfo in bundled files.
* Tests not fixed, because syntax of phpunit (<7 vs >9.3) are not compatible.
* In next release, needs to drop php5 and php7.0 support (in order to use phpunit > 7)
2020-08-11 19:30:46 -07:00
Peter Newman
e2cc2de304
Fix lots of spelling errors (#7751)
* Fix a typo

* Fix lots of spelling errors

* Fix a few more spelling mistakes

* s/parsable/parseable/

* Don't touch the third party files

* Cloneable is the preferred C# term

* Copyable is the preferred C++ term

* Revert "s/parsable/parseable/"

This reverts commit 534ecf7675.

* Revert unparseable->unparsable corrections
2020-08-10 11:08:25 -07:00
Paul Yang
0929596575 Check realoneof in json parsing (#7763)
* Check realoneof in json parsing

* Fix whichoneof to also work for synthetic oneof
2020-08-07 14:44:49 -07:00
James Newton-King
d4abad8731
Optimize reading strings across segments 2020-07-01 20:32:29 +12:00
Joshua Haberman
2adea4c64a Some preliminary work towards a ruby builder. 2020-04-19 11:40:59 -07:00
Tim Swast
29c83baecc
python: add sphinx docs (#6525)
* python: generate documentation with Sphinx and Read the Docs

Background:

Formerly, the Python protobuf reference documentation was built with
[Epydoc](http://epydoc.sourceforge.net/). This package has not been
updated since 2008, and it has inconsistent formatting (see internal
issue 131415575) with most Python documentation. Sphinx is used for the
official docs.python.org docs as well as most other Python packages,
including the Google client libraries and related packages, such as
https://googleapis.dev/python/google-api-core/latest/

To build the docs with Sphinx:

1. Install the needed packages (`sphinx`, `sphinxcontrib-napoleon` for
Google-style docstring support). I've created a conda environment file
to make this easier:

```
conda env create -f python/docs/environment.yml
```

2. (Optional) Generate reference docs files and regenerate index:

```
cd python
python generate_docs.py
cd ..
```

3. Run Sphinx.

```
cd python/docs
make html
```

About this change:

The script at `python/generate_docs.py` creates a ReStructured Text file
for each public module in the protobuf Python package. The script also
updates the table of contents in `python/docs/index.rst` to point to
these module references.

Future work:

Testing the docs build on PRs requires contributors to actually do some
setup work to configure builds on their fork. It'd be better if CI had a
docs build session to verify that the Sphinx docs generation at least
runs.

There are many warnings due to not-quite-correct docstrings in the
actual Python code itself. I'm choosing to ignore these errors to keep
the PR small, but I recommend you fix these and then enable "fail on
warnings" in the docs build on CI.

* add docs to EXTRA_DIST

* add instructions to build documentation to generate_docs.py

* exclude python/odcs from cpp_distcheck
2020-02-11 11:40:17 -08:00
Paul Yang
fe1790ca0d
Fix Multiple Request for PHP (#7008)
* Add scripts to test multirequest

* chmod ug+x multirequest.sh

* Add continuous test

* Compile c extension

* Class entry is obsolete in the second request
1) Needes to use class name in persistent map
2) Invalidate class entry stored in descriptor

* Add new files to dist

* Fix compile_extension

* Cleanup outputs for phpize
2019-12-12 13:59:51 -08:00
Paul Yang
c53e5b8e11
Avoid too much overhead in layout_init (#6716)
* Avoid initializing primitive fields in layout_init

* Avoid initializing string/bytes/message fields in layout_init

* Lazily create map when needed

* Lazily create repeated fields

* Change layout_init to only do memcpy

* Fix test for php-7.0

* Fix conformance test where default value of string/message map is not encoded

* Fix test for zts

* Clean up

* Fix comments
2019-10-29 12:48:24 -07:00
Paul Yang
ce942bcae1
Add binary conformance tests for map fields (#6560)
* Add binary conformance tests for map fields

* Update failure list

* Fix php conformance test

* Fix php conformance test

In 32-bit platform, int64 should be string. However, map iterator returns string key as integer.

* Add more test cases for map

* Update failure list
2019-09-03 10:47:32 -07:00
ST-DDT
5af81a442b
Use parameter name comment 2019-06-26 20:39:03 +02:00
Paul Yang
d7c4409589
Php 7.3 fix (#5434)
* Inherit from message instead of implement

When regestering class (implmenets other class) during MINIT, zend_class_implements
would call zend_class_entry->interface_gets_implemented(). In PHP-7.3 interface_gets_implemented shares the same location with create_object.
However, during MINIT, the global object storeage hasn't been initialized. And thus, caused segment fault in php 7.3.

* Use zend_string_init where interned string may be the value.
zend_string_dup will keep using the existing interned string.
In php 7.3, interned string cannot be destroyed from user's code.

* Uncommment debug code

* Use latest phpunit for each php versions

* Revert change in Dockerfile

* Update php test to use the new docker image

* Update composer

* Change docker organization

* Update phpunit

* Debug phpunit

* Store phpunit into bin dir in docker image

* Install valgrind to docker

* Fix compatibility test

* Remove generated_service_test from compatibility c extension test

* Update 32bit php test to the new docker image

* Install bison

* Fix build.sh

* Fix DOCKERIMAGE_PREFIX

* Fix basename

* Add comment to build_and_run_docker2.sh

* Remove commented code

* Fix comments
2018-12-18 10:57:03 -08:00
michaelbausor
6a51c03823 PHP: Add support for primitive types in setters (#5126)
* Add support for primitive types in setters

* Update to address PR feedback

* Add tests and fixes for repeated fields

* Remove repeated field code, add getters

* Cleanup, test getters and oneofs

* Move boxing logic into separate class

* Add tests for wrapper type constructor args

* Update to add new setXXXValue methods

* Fix tests for invalid values

* Fix c extension for wrapper accessors

* Fix the bug that well known types didn't call Message_construct

* Address PR comments

* Refactoring init message with array logic

* Add include path to protoc

* Add missing TSRM_LS defintion

* Fix TSRM_LS

* Fix dist check
2018-10-07 16:56:41 -07:00
Joshua Haberman
19ef4ab1c2
Merge pull request #4816 from hrsht/hrsht/zanker-proto2
Basic Proto2 support for Ruby gem
2018-09-27 15:23:10 -07:00
Harshit Chopra
d0535cc09e Adds support for proto2 syntax for Ruby gem.
This change only adds basic proto2 support without advanced features
like extensions, custom options, maps, etc.

The protoc binary now generates ruby code for proto2 syntax.
However, for now, it is restricted to proto2 files without advanced features
like extensions, in which case it still errors out.

This change also modifies the DSL to add proto messages to the DescriptorPool.
There is a new DSL Builder#add_file to create a new FileDescriptor. With this,
the generated ruby DSL looks something like:

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file "test.proto" do
    add_message "foo" do
      optional :val, :int32, 1
    end
  end
end
2018-09-27 14:21:16 -04:00
Yuzhang Hu
9c7655c9fc Ignore python .egg file to make git status clean #5004 2018-08-05 02:58:30 -07:00
mkosieradzki
d6775fa8d6
Added support for Visual Studio 2017 in gitignore 2018-07-22 11:00:35 +02:00
Feng Xiao
143851ed25
Remove js_embed binary. (#4709)
* Remove js_embed binary.
2018-06-01 11:00:04 -07:00
Paul Yang
9ccc3e536c
Adopt ruby_package in ruby generated code. (#4627)
* Adopt ruby_package in ruby generated code.

* Add test for ruby_package
2018-05-17 17:11:06 -07:00
Thomas Hisch
451e0446ab Add __init__.py files to compiler and util subpackages (#4117)
The compiler and util subpackages are created by the build_py class in
setup.py. This has caused an issue in the protobuf package in
conda-forge (https://github.com/conda-forge/protobuf-feedstock/issues/40),
which is fixed by this commit.
2018-04-09 12:43:10 -07:00
Adam Cozzette
612b670086 Updated .gitignore to exclude downloaded gmock/ directory 2018-03-27 09:54:33 -07:00
Carlos O'Ryan
3c5442a95d Include googletest as a submodule (#3993)
Add googletest as a submodule in third_party/googletest.
2018-03-26 13:54:32 -07:00
Paul Yang
23adfeb003 Reserve unknown in Ruby (#3763)
* Reserve unknown in ruby

* Revert ruby tests. Wait for cpp impl for conformance test

* Add conformance test for preserving unknown

* Add unknown field conformance test to csharp failure list.

* Fix comments

* Fix comment

* Fix comments

* Fix typo

* Use stringsink_string directly

* Mark hd unused

* Remove unused encodeunknown_handlerfunc
2017-10-26 14:41:43 -07:00
Paul Yang
cd5f49d094 Fix ruby segment fault (#3708)
* Fix ruby segment fault

1) rb_ary_new cannot be called during allocate function. During allocate
fucntion, the containing object hasn't been marked and rb_ary_new may
invoke gc to collect containing object.
2) The global map should be marked before allocating it. Otherwise it
may be garbage collected.

* Add test

* Remove commented code

* Fix grammer error
2017-10-03 17:28:49 -07:00
Yilun Chong
91da852c50 update .gitignore 2017-06-28 11:39:05 -07:00
Yilun Chong
0255431ca7 revert .gitignore 2017-06-28 11:35:11 -07:00
Yilun Chong
0fa4e58525 change ignore 2017-06-27 18:31:44 -07:00
Jakob Buchgraber
d0e6f3b9ab bazel: add bazel symlinks to .gitignore 2017-06-16 12:39:32 +02:00
Paul Yang
25abd7b7e7 Add compatibility test for php. (#3041)
* Add compatibility test for php.

* Revert API incompatible change.
2017-05-05 11:14:11 -07:00
Adam Cozzette
9053033a50 Merge remote-tracking branch 'remotes/google/3.3.x' into merge-3.3-to-master 2017-04-27 14:55:53 -07:00
Paul Yang
190b5270c8 Make PHP c extension work with PHP7 (#2951) 2017-04-19 16:23:51 -07:00
Adam Cozzette
37c7b766b3 Merge pull request #2930 from anuraaga/dev_rag
Fix error message for int64 parse failure.
2017-04-04 09:31:14 -07:00
Adam Cozzette
10ea25133d Added compatibility tests for version 3.0.0 2017-04-03 12:55:20 -07:00
Anuraag Agrawal
11c902ea2e Add IntelliJ project to gitignore for java project. 2017-04-03 17:32:08 +09:00