Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 3.19.x into master #9169

Merged
merged 7 commits into from
Nov 2, 2021
Merged

Merge 3.19.x into master #9169

merged 7 commits into from
Nov 2, 2021

Conversation

acozzette
Copy link
Member

No description provided.

acozzette and others added 6 commits October 28, 2021 10:34
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.
If the line above raises an exception, the upb_arena is lost and memory
is leaked.
I also updated CHANGES.txt to include a couple things I forgot to add
for 3.19.0.
Cherry-pick fixes for 3.19.1 and update change log
@google-cla
Copy link

google-cla bot commented Oct 29, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@acozzette
Copy link
Member Author

The CLA is OK because these commits have already gone through the CLA process.

@elharo
Copy link
Contributor

elharo commented Oct 29, 2021

Kokoro failures are worth a look:

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
google/protobuf/pyext/map_container.cc:549:8: error: ‘PyType_Slot’ does not name a type
static PyType_Slot ScalarMapContainer_Type_slots[] = {
^
google/protobuf/pyext/map_container.cc:560:1: error: ‘PyType_Spec’ does not name a type
PyType_Spec ScalarMapContainer_Type_spec = {
^
google/protobuf/pyext/map_container.cc:766:8: error: ‘PyType_Slot’ does not name a type
static PyType_Slot MessageMapContainer_Type_slots[] = {
^
google/protobuf/pyext/map_container.cc:776:1: error: ‘PyType_Spec’ does not name a type
PyType_Spec MessageMapContainer_Type_spec = {
^
google/protobuf/pyext/map_container.cc: In function ‘bool google::protobuf::python::InitMapContainers()’:
google/protobuf/pyext/map_container.cc:913:33: error: ‘ScalarMapContainer_Type_spec’ was not declared in this scope
PyType_FromSpecWithBases(&ScalarMapContainer_Type_spec, bases.get()));
^
google/protobuf/pyext/map_container.cc:913:74: error: ‘PyType_FromSpecWithBases’ was not declared in this scope
PyType_FromSpecWithBases(&ScalarMapContainer_Type_spec, bases.get()));
^
google/protobuf/pyext/map_container.cc:920:33: error: ‘MessageMapContainer_Type_spec’ was not declared in this scope
PyType_FromSpecWithBases(&MessageMapContainer_Type_spec, bases.get()));
^
google/protobuf/pyext/map_container.cc: At global scope:
google/protobuf/pyext/map_container.cc:517:13: warning: ‘void google::protobuf::python::ScalarMapDealloc(PyObject*)’ defined but not used [-Wunused-function]
static void ScalarMapDealloc(PyObject* _self) {
^
google/protobuf/pyext/map_container.cc:731:13: warning: ‘void google::protobuf::python::MessageMapDealloc(PyObject*)’ defined but not used [-Wunused-function]
static void MessageMapDealloc(PyObject* _self) {
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@acozzette
Copy link
Member Author

I think that failure is actually a weird artifact of Kokoro and is not related to this change. It's a continuous benchmark run rather than a presubmit check, and it has already been failing for a while.

@acozzette
Copy link
Member Author

The Python benchmark error will hopefully be fixed by #9170.

@elharo
Copy link
Contributor

elharo commented Oct 29, 2021

Sound good. Running the tests now.

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.
@google-cla
Copy link

google-cla bot commented Nov 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strangely now ruby is failing:

Loaded suite /usr/local/rvm/rubies/jruby-9.3.0.0/lib/ruby/gems/shared/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
...........F
===============================================================================
Failure: test_hash(BasicTest::MessageContainerTest): <false> is not true.
/tmp/protobuf/protobuf/ruby/compatibility_tests/v3.0.0/tests/basic.rb:190:in `test_hash'
     187:       assert m2.hash != 0
     188:       # relying on the randomness here -- if hash function changes and we are
     189:       # unlucky enough to get a collision, then change the values above.
  => 190:       assert m1.hash != m2.hash
     191:     end
     192:
     193:     def test_unknown_field_errors
org/jruby/RubyKernel.java:1237:in `catch'
org/jruby/RubyKernel.java:1232:in `catch'
org/jruby/RubyKernel.java:1237:in `catch'
org/jruby/RubyKernel.java:1232:in `catch'

@acozzette
Copy link
Member Author

I think that test failure must have been a flake. I reran the test and now it is passing.

@acozzette acozzette merged commit 7ccf4d8 into master Nov 2, 2021
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants