Commit Graph

7244 Commits

Author SHA1 Message Date
Joshua Haberman
462b928d63 Fixed build errors on MacOS. 2020-03-31 20:34:36 -07:00
Joshua Haberman
243558921f Some fixes to make the tests pass on Bazel. 2020-03-31 17:31:32 -07:00
Joshua Haberman
6e229f124e Revert mistake in the previous integration. 2020-03-31 17:08:31 -07:00
Joshua Haberman
9c676d83ea Regenerated protos with ./generate_descriptor_proto.sh 2020-03-31 16:35:09 -07:00
Joshua Haberman
b99994d994 Sync from Piper @304070343
PROTOBUF_SYNC_PIPER
2020-03-31 16:25:37 -07:00
Jie Luo
dec4939439
Update README.md (#7329) 2020-03-25 15:59:46 -07:00
Charlie Jiang
70fc0f0275 Force to use U.S. English for Win32 error messages (#4317) 2020-03-20 08:49:47 -07:00
Robert Morris
a015ca8cf8
Request SummaFT extension (#7314)
SummaFT develops a protoc plugin for both internal and external use that allows specific extensions to be made to extend the platform for GraphQL and OpenAPI 3.
2020-03-19 14:20:01 -07:00
James Roper
ab968155e5 Add Cloudstate extensions 2020-03-19 08:40:39 -07:00
Joshua Haberman
4567a21004
Removed unnecessary includes of well-known types from PHP generator. (#7311)
* Removed unnecessary includes of well-known types from PHP generator.

* Changed some split calls to work properly with the Copybara import rewrites.
2020-03-18 16:29:29 -07:00
Rafi Kamal
53128559ae
Update missing/renamed kernel files (#7310) 2020-03-17 12:16:12 -07:00
Adam Cozzette
a80775c391 Allocated extension number 1079 for grpc-graphql-gateway
Fixes issue #7302.
2020-03-17 08:27:19 -07:00
Rafi Kamal
da1c46401b Project import generated by Copybara
PiperOrigin-RevId: 301311140
2020-03-16 23:09:45 -07:00
Rafi Kamal
422053f3bc Project import generated by Copybara
PiperOrigin-RevId: 300708221
2020-03-13 00:58:26 -07:00
Jan Tattermusch
f57ae5eac3
Merge pull request #7279 from jtattermusch/ParseRawPrimitivesBenchmark
Add benchmark for measuring raw primitive parsing speed
2020-03-12 19:11:39 +01:00
Protobuf Team
94b39efdf7 Project import generated by Copybara
PiperOrigin-RevId: 300369497
2020-03-11 11:31:16 -07:00
Jan Tattermusch
a0cc0e83cb
Remove unnecessary branch from ReadTag (#7289)
* Remove unnecesary branch from ReadTag

* address comments
2020-03-11 10:29:37 -07:00
Joe Tsai
9bccb253c4 Add license header to benchmark/datasets .proto files 2020-03-11 09:52:33 -07:00
Jan Tattermusch
447b6bbad8 address review comments 2020-03-11 07:08:46 -04:00
Yannic
88a3193f42 Remove check that C++ version is at least C++98 2020-03-10 13:04:59 -07:00
Yannic
edb67ec446 Fix typo 2020-03-10 13:04:59 -07:00
Yannic
8a5a242364 Add compile-time tests for RTTI to port_def.inc
This eliminates an ODR violation where users compile and install
Protobuf's C++ runtime without RTTI but do not define
GOOGLE_PROTOBUF_NO_RTTI when compiling their project with
the generated code.
2020-03-10 13:04:59 -07:00
David L. Jones
6f129c123e
Update docs so we can generate better output from Sphinx. (#7295)
This change updates docstrings and comments so that they will produce nicer
formatting and cross-references from Sphinx. There are a few broad categories of
changes:

- Paramter and attribute docs are updated so that types will be recognized by
  Napoleon (https://sphinxcontrib-napoleon.readthedocs.io/en/latest/) This
  usually just means moving a colon in the docstring, so
  `name: (type) description` becomes `name (type): description`.

- References to other symbols can be cross-references if they have the right
  format. For example, "attr_name" might become ":attr:`attr_name`".
  https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-python-objects

- For fenced code blocks, adding a double-colon `::` signifies a literal block.
  https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks

- Some bits of docstrings move from docstring to comments. For TODOs, this
  means we won't be putting stale (or otherwise unrelated) noise into the docs.
  For `Message.DESCRIPTOR`, the change means it gets appropriate documentation.

- There are some wording tweaks for consistency, and some new docstrings
  (especially for methods in Message).

For types, I used the convention of `list[Foo]` and `dict(foo, bar)`, which seem
to be common among other Python rst docstrings. Sphinx should generally
recognize both, and cross-links them correctly (both internally and to Python
library documentation). Upgrading to Python3-style type annotations would allow
us to use `sphinx-autodoc-typehints`; the changes in this commit are very
similar to typing-based hints.
2020-03-10 12:57:30 -07:00
Rafi Kamal
637d7eda30 Project import generated by Copybara
PiperOrigin-RevId: 300117791
2020-03-10 10:08:50 -07:00
David L. Jones
228fbf513d Change dependencies in the Conda environment.
We can remove the dependency on sphinxcontrib, since sphinx.ext.napoleon is
already available. This means we can drop conda-forge, which substantially
reduces build memory usage (see: readthedocs/readthedocs.org#6742,
conda/conda#5003, conda/conda#8650, readthedocs/readthedocs.org#6692).

Bump Sphinx to 2.4.0, while we're at it.
2020-03-09 19:55:33 -07:00
Rafi Kamal
4fa3c8e883 Project import generated by Copybara
PiperOrigin-RevId: 299970447
2020-03-09 17:00:42 -07:00
Falko Axmann
460376190b cmake: extended protobuf_generate
Added an optional `PLUGIN` argument to `protobuf_generate` which
will be forwarded to the `--plugin=` argument of `protoc`.
2020-03-09 15:03:07 -07:00
David L. Jones
f130827371 Don't expect to include Python ReadTheDocs metadata in the distribution. 2020-03-06 17:34:07 -08:00
David L. Jones
619a8262aa Make sure setup.py has a valid path.
In some invocation patterns, `os.path.dirname(__file__)` may not return a valid
value. This change defaults to os.curdir in that case.
2020-03-06 17:34:07 -08:00
Jan Tattermusch
b90d3bd854 add benchmark for measuring raw primitive parsing speed 2020-03-05 12:09:11 +01:00
Yannic Bonenberger
723a85f797 [bazel] Remove bootstrap hack from cc_proto_library and add interop with proto_library
Bazel had a native `cc_proto_library` for more than 2 years now.
This is the first step towards removing that rule from the Protobuf
repo.
2020-03-04 09:25:41 -08:00
Yannic
2e51ad6344
[bazel] Update gtest and deprecate //external:{gtest,gtest_main} (#7237)
This change updates the gtest-version used by Bazel.
Also, `//external:{gtest,gtest_main}` is deprecated so we can remove some
of the uses of the discouraged `bind` function.

RELNOTES[bazel]: Starting with Protobuf 3.13.0, building and running
Protobuf tests requires `@com_google_googletest//:{gtest,gtest_main}`
instead of `//external:{gtest,gtest_main}`. Use
`--@com_google_protobuf//:incompatible_use_com_google_googletest=true`
to verify your workspace is not affected by this change.
2020-03-02 15:15:22 -08:00
Rafi Kamal
398b801355
Merge pull request #7275 from protocolbuffers/rafi-kamal-patch-3
Add bazel to the list of acceptable mergeable tags
2020-03-02 15:11:43 -08:00
Rafi Kamal
37934fe46f
Update mergeable.yml 2020-03-02 15:10:49 -08:00
Rafi Kamal
154788bb4c
Add bazel to the list of acceptable mergeable tags 2020-03-02 13:41:56 -08:00
Rafi Kamal
64f151fa2b Project import generated by Copybara
PiperOrigin-RevId: 298409332
2020-03-02 11:59:44 -08:00
David L. Jones
4ff0fb841c
Merge pull request #7150 from tswast/issue4498-readthedocs
python: publish sphinx docs to read the docs
2020-02-28 20:28:04 -08:00
Tim Swast
35a2bf9d90
python: publish sphinx docs to read the docs
Background:

This is a follow-up to the PR that adds sphinx docs.

Read the Docs is a hosting platform for documentation, primarily Python
docs. It supports builds at commit time as well as at specific git
labels to support versioned docs. I have claimed the
protobuf.readthedocs.io project and can add any Googlers who need access
to be able to configure and trigger builds.
https://readthedocs.org/projects/protobuf/builds/ It's also relatively
easy to create a new project to test the documentation builds from a
fork, such as https://readthedocs.org/projects/tswast-protobuf/builds/

About this change:

Once web hooks are configured, Read the Docs will automatically build
the docs for the latest changes on the master branch.

I needed to update `python/setup.py` to support installation from the
root of the repository because Read the Docs does not `cd python` before
installing the protobuf package with `setup.py install`. To support
this, I updated the file paths to use the absolute path to files. The
`__file__` special variable comes in handy for this, as it provides the
path to the `setup.py` file.

A banner is added to the docs when published to readthedocs. This links
to the official documentation and the future home of the stable API
reference on googleapis.dev.
2020-02-28 13:36:50 -06:00
Daniel Kurka
ed19442270 Project import generated by Copybara
PiperOrigin-RevId: 297743020
2020-02-27 18:55:33 -08:00
Rafi Kamal
9bbc664671 Project import generated by Copybara
PiperOrigin-RevId: 297709554
2020-02-27 15:55:57 -08:00
David L. Jones
42903f87f0
Merge pull request #7154 from tswast/issue4498-googleapis.dev
python: publish sphinx docs to googleapis.dev
2020-02-27 14:30:54 -08:00
David L. Jones
73f3a7209b Fix typo in Makefile.am.
This is a fix for a typo in commit 743a4322ba.

The missing newline continuation causes the re-generated Makefile to yield a parse error.
2020-02-27 11:26:39 -08:00
Protobuf Team
d2727a2ce3 Project import generated by Copybara
PiperOrigin-RevId: 297637283
2020-02-27 10:55:04 -08:00
Artem Kustikov
743a4322ba
Fix js message pivot selection (#6813)
* fix javascript setFieldIgnoringDefault_ logic

* remove package-lock.json

* fix build script to include new UT asset file

Co-authored-by: Daniel Kurka <kurka.daniel@gmail.com>
2020-02-27 09:10:16 -08:00
Mark Schaller
88579a44fb Reserve extension for Bazel failure detail metadata
The Bazel project (https://github.com/bazelbuild/bazel) intends to
enrich its server app's (protobuf-defined) command service's status
message with a structured representation of what, if anything, went
wrong while processing a command. We wish to use custom options to add
metadata to the protobuf constructs involved.

release notes: no
2020-02-25 14:40:36 -08:00
Egor Pugin
c798ba18a9 bug: #7076 adds ERROR to windows portability files 2020-02-21 14:49:18 -08:00
wsw2016
b96241b1b7 Improves performance of json_stream_parser.cc by factor 1000
JsonStreamParser::GetNextTokenType() uses HasPrefixString a lot on StringPiece as input. For each call two std::strings are constructed, compared and destroyed. Parsing of json-files with 50-60 MB in debug mode takes minutes.
2020-02-19 11:33:46 -08:00
Rafi Kamal
1370c7303a
Merge pull request #7231 from protocolbuffers/3.11.x-202002181624
Merge branch 3.11.x to master
2020-02-18 17:39:41 -08:00
Rafi Kamal
0eb476b696 Merge branch 3.11.x to master 2020-02-18 16:42:47 -08:00
Rafi Kamal
df2bce345d
Remove 32-bit Mac protoc reference from collect_all_artifacts (#7228) 2020-02-18 12:55:01 -08:00