Commit Graph

8887 Commits

Author SHA1 Message Date
Adam Cozzette
13d559beb6
Update our build script to publish Mac aarch_64 binaries (#9203)
These are still x86-64 binaries at the moment (see #8557), but should be
usable on M1 Macs in the Rosetta compatibility mode. Let's start
publishing them on our GitHub release page and then eventually we can
make them into true aarch_64 binaries.

This fixes #9200.
2021-11-08 13:40:52 -08:00
Derek Perez
3a4d9316aa
Creates a protoc release zip (#9188)
* Creates a protoc release zip

Mimics what we're doing manually today but powered by Bazel.

* don't special case this.

* Addressing feedback.

* adding comment about _cc_toolchain
2021-11-04 15:57:29 -07:00
Xùdōng Yáng
11de748d66
Use repo-relative labels wherever possible (#9187)
* Use repo-relative labels wherever possible

The label `@com_google_protobuf//:foo` within the protobuf repo is often synonymous with just `//:foo`. We should prefer the latter as it allows us to use a shorter name for the module in the Bazel Central Registry (so just "protobuf" instead of "com_google_protobuf").

Note that the semantics can be subtle: in a macro, plain strings are anchored to the *calling* repo, so if we just use `//:foo` as the default value of a macro argument, it will be resolved to `@myrepo//:foo` if the macro is called from the repo `@myrepo`. In this case, it's necessary to directly call the `Label()` constructor to anchor the string label to the repo where the .bzl file lives.

See https://github.com/bazelbuild/bazel-central-registry/pull/28#issuecomment-954741081 for a bit more context.

* fix protobuf_deps.bzl
2021-11-04 07:56:32 -07:00
Kent Ross
d88c8d5d4b
Implement unambiguous comparisons for RepeatedPtrIterator in C++20 (#9139) 2021-11-04 07:16:02 -07:00
Adam Cozzette
7ccf4d8f67
Merge pull request #9169 from protocolbuffers/3.19.x
Merge 3.19.x into master
2021-11-02 10:10:47 -07:00
JongChan Choi
c4c7e2b8f9
Add pbkit to third_party.md (#9177) 2021-11-01 13:53:04 -07:00
Adam Cozzette
31dd7b71cc
Fix benchmark by making sure we use Python 3 (#9170) (#9176)
The benchmark runs have been failing since we started requiring Python
3, so this changes fixes the benchmarks by ensuring we always use Python
3.
2021-11-01 11:44:58 -07:00
Adam Cozzette
6a9cf18cba
Fix benchmark by making sure we use Python 3 (#9170)
The benchmark runs have been failing since we started requiring Python
3, so this changes fixes the benchmarks by ensuring we always use Python
3.
2021-11-01 09:00:31 -07:00
Thomas Hisch
26603a1466
Remove unittest2 imports (#9171)
They were only needed for python versions <= 2.6

Related: #6658
2021-10-30 11:56:40 -07:00
Elliotte Rusty Harold
201c1fc918
Merge pull request #9162 from belugabehr/ArrayList-copyof
Standardize on Array copyOf
2021-10-29 11:51:56 +00:00
Adam Cozzette
7c40b2df1f
Update protobuf version (#9167) 2021-10-28 14:07:53 -07:00
Adam Cozzette
42ff92a4d1
Merge pull request #9166 from acozzette/cherry-pick-fixes
Cherry-pick fixes for 3.19.1 and update change log
2021-10-28 13:07:03 -07:00
Adam Cozzette
1c8ae24595 Update changelog for 3.19.1
I also updated CHANGES.txt to include a couple things I forgot to add
for 3.19.0.
2021-10-28 18:09:06 +00:00
Peter Zhu
b2ac7ced50 Fix memory leak in MessageClass.encode
If the line above raises an exception, the upb_arena is lost and memory
is leaked.
2021-10-28 17:47:53 +00:00
Marnix Bouhuis
e58469bdbe JS: Fixed ReferenceError: window is not defined when getting the global object (#9156) 2021-10-28 17:46:36 +00:00
Adam Cozzette
c7dfd0d6b9
Align dependency handling with Bazel best practices (#9165)
This commit removes the use of bind() since that function goes against
Bazel best practices:
https://docs.bazel.build/versions/main/external.html#repository-rules-1
The bind() function basically maps a dependency into //external, but
there is no good reason to do this. By mapping dependencies into
//external and relying on this in our own BUILD files, we're forcing
projects that depend on us to do the same. The one bind() call that I
did leave in place was //:python_headers. This one seems to be doing
something complicated I don't fully understand, and I don't want to risk
breaking it.

This change also moves our list of required Maven artifacts into a
constant in protobuf_deps.bzl. This way, projects that depend on us can
refer to this list when they invoke maven_install() and automatically
pull in all the necesary dependencies.

This fixes #9132.
2021-10-28 10:34:54 -07:00
deannagarcia
85c4bc4205
Merge pull request #8254 from jufemaiz/feature/ruby-better-from_-support-well_known_types
Improvement: better ruby from_* support in well_known_types.rb
2021-10-27 14:13:27 -07:00
Joel Courtney
bbdcea8547
Remove lib from require 2021-10-28 07:09:11 +11:00
Chris Bainbridge
65852d6e9c
Fix comment syntax in any.proto (#8792)
* Fix comment syntax in any.proto

Remove extra spaces which cause incorrect indentation in godoc.
Remove the "====" style title which is not rendered by godoc.

* Run ./generate_descriptor_proto.sh
2021-10-27 11:28:21 -07:00
appledragon
1d2e8d9302
for old clang build issue, related with https://reviews.llvm.org/D12375 (#9159)
This seems wrong: given [[foo]] [[bar]], we'll now parse the second one as an MS attribute in a context where both are allowed.
2021-10-27 09:45:42 -07:00
David Mollitor
935d099ad9 Standardize on Array copyOf 2021-10-27 11:08:33 -04:00
Joel Courtney
4d94a7cd93 Fixed: incorrect tests 2021-10-27 22:20:45 +11:00
Adam Cozzette
9c3af64ae4
Update checked-in C# generated code (#9158)
This change fixes the test that verifies that the checked-in generated
code for descriptor.proto is up to date.
2021-10-26 14:31:46 -07:00
deannagarcia
247649cdb0
Merge pull request #9150 from Shopify/pz-message-encode-mem-leak
[Ruby] Fix memory leak in MessageClass.encode
2021-10-26 13:01:52 -07:00
Marnix Bouhuis
e350ef8c20
JS: Fixed ReferenceError: window is not defined when getting the global object (#9156) 2021-10-26 09:48:47 -07:00
Joel Courtney
947a51a464 Test coverage: .from_ruby / #from_ruby 2021-10-26 12:43:57 +11:00
Elliotte Rusty Harold
b3b3162219
Merge pull request #9148 from belugabehr/nio-charsets
Transition to NIO StandardCharsets
2021-10-25 21:44:38 +00:00
deannagarcia
d630f96dce
Merge pull request #9144 from appledragon/master
for windows build fail issue, confliction with std max
2021-10-25 14:30:45 -07:00
Dennis Shao
2007a39db0
Merge pull request #9151 from Inconnu08/patch-1
Fix grammatical error in the descriptor protobuf definition
2021-10-25 15:46:36 -05:00
Taufiq Rahman
84c2e1e502
Fix grammatical error in comments #7603 2021-10-26 02:09:13 +06:00
Peter Zhu
3a18299cc0 Fix memory leak in MessageClass.encode
If the line above raises an exception, the upb_arena is lost and memory
is leaked.
2021-10-25 15:55:12 -04:00
David Mollitor
3370cc4456 Transition to NIO StandardCharsets 2021-10-25 13:46:34 -04:00
appledragon
02d2e5fdd7
Update stl_util.h 2021-10-25 15:31:06 +08:00
Nipunn Koorapati
0707f2e7f5
Provide a type alias field ValueType on EnumTypeWrapper (#8182)
This should provide a runtime alias, which can be
used in mypy stubs to provide better typing for enum values

Fixes #8175
2021-10-21 15:09:41 -07:00
Derek Perez
adc1f931e3
Fix wkt dupes (#8942)
* properly ignore WKTs in lang_proto_toolchain for java

We already pre-compile the well known types into the runtimes so they shouldn't be re-compiled. #8925

* remove accidental proto addition.
2021-10-21 14:17:20 -07:00
Adam Cozzette
f4af0bc931
Fix distcheck test by updating example Go file paths (#9137) 2021-10-21 14:15:54 -07:00
Damien Neil
c8dfe32b5a
examples: update Go example (#7217)
Update the Go example to use Go modules: Move the example into a
directory containing a go.mod file, change the installation instructions
to use "go install".

Update the go_package option in addressbook.proto to an actual module path.

Update examples to use the google.golang.org/protobuf/proto module.
2021-10-21 13:27:40 -07:00
Adam Cozzette
42db8a3f96
Make IsDescriptor* helpers lenient about descriptor name (#9127)
Our internal version of the codebase has a different path and package
name for descriptor.proto, so this change updates IsDescriptorProto()
and IsDescriptorOptionMessage() to be able to handle both the internal
and external descriptor types.
2021-10-21 11:47:05 -07:00
Adam Cozzette
e6430dd4a0
Merge pull request #9136 from protocolbuffers/3.19.x
Merge 3.19.x into master
2021-10-21 11:45:51 -07:00
Upils
1e1c1cd884
Reserve extension id range for protoc-gen-checker (#9133) 2021-10-21 08:24:38 -07:00
Adam Cozzette
67c2a92f82
Ensure that release archives contain everything needed for Bazel (#9131)
This change adds some files to EXTRA_DIST in Makefile.am so that our
published tar and zip files will have everything needed for Bazel
builds. I also added a basic test for this so that next time we should
find out sooner if we're missing any important files.

This should fix #9129.
2021-10-21 06:47:17 -07:00
Adam Cozzette
63f952b987
Fix Python 3.10 C++ tests (#9128)
The first change is to make sure we always define PY_SSIZE_T_CLEAN
before including Python.h. Starting from Python 3.10 this is required.
Otherwise we get errors like this:

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The second change is to update reflection_test.py to account for the
fact that with Python 3.10, we get a TypeError even with the C++
implementation when trying to assign a float to a bool field. I'm not
sure why this changed with Python 3.10, but it seems like a good thing
since this is the desired behavior anyway.
2021-10-20 14:51:07 -07:00
Adam Cozzette
17b30e9647
Update protobuf version (#9119) 2021-10-20 10:14:02 -07:00
Joshua Haberman
912eb8b89e
Merge pull request #9121 from haberman/rubyfix
Fix for descriptor_pb.rb: google/protobuf should be required first.
2021-10-19 17:14:26 -07:00
Joshua Haberman
bb5a2684de Minor whitespace fixes and test fixups. 2021-10-19 16:21:24 -07:00
deannagarcia
51cb7f99d7
Merge pull request #9120 from protocolbuffers/kotlinInlining
Fixing inlining and deprecation for repeated string fields in kotlin
2021-10-19 15:21:52 -07:00
Joshua Haberman
4c445b1803 Fix for descriptor_pb.rb: google/protobuf should be required first. 2021-10-19 14:51:52 -07:00
Deanna Garcia
ad9eb238cc Fixing formatting 2021-10-19 21:36:30 +00:00
Deanna Garcia
33113ce9f9 Fixing inlining and deprecation for repeated string fields in kotlin 2021-10-19 21:34:32 +00:00
Adam Cozzette
3f3e6f47c6
Update version to 3.19.0-rc2 and fix changelog about Java 7 (#9116)
* Update protobuf version

* Update CHANGES.txt to reflect that we're not yet dropping Java 7
2021-10-19 09:01:57 -07:00