Skip to content

GH-35538: [C++] Remove unnecessary status.h include from protobuf - #35673

Merged
westonpace merged 1 commit into
apache:mainfrom
felipecrv:pb
May 18, 2023
Merged

westonpace merged 1 commit into
apache:mainfrom
felipecrv:pb

Conversation

@felipecrv

@felipecrv felipecrv commented May 18, 2023 •

Copy link
Copy Markdown
Contributor

Rationale for this change

Newer versions of protobuf use absl::Status instead of google::protobuf::util::Status. The status variables in this file are type-annotated with auto and we can count on the header that declares the status-returning function we are calling to have included the header that defines Status.

What changes are included in this PR?

Removing an include of a protobuf header that don't exist in later versions of the library.

Are these changes tested?

I haven't tried building with protobuf 23, but I can be sure this specifically fixes the problem reported in #35538.

Newer versions of protobuf use absl::Status instead of
google::protobuf::util::Status. The `status` instances in this file are
type-annotated by `auto` and we can count on the header that declares
the status-returning function we are calling to have included the header
that defines `Status` for us.
@felipecrv
felipecrv requested a review from westonpace as a code owner May 18, 2023 17:26
@felipecrv

Copy link
Copy Markdown
Contributor Author

@westonpace

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #35538 has been automatically assigned in GitHub to PR creator.

@pitrou

pitrou commented May 18, 2023

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g cpp

@github-actions

Copy link
Copy Markdown

Revision: 3d7aad9

Submitted crossbow builds: ursacomputing/crossbow @ actions-e7fbd041c5

Task Status
test-alpine-linux-cpp Github Actions
test-build-cpp-fuzz Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-cuda-cpp Github Actions
test-debian-10-cpp-amd64 Github Actions
test-debian-10-cpp-i386 Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-fedora-35-cpp Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-20 Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-minimal-with-formats Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-22.04-cpp Github Actions

@westonpace westonpace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The commit that introduced this include did so via IWYU. My guess is IWYU maybe got confused between arrow::Status and protobuf Status.

@felipecrv

felipecrv commented May 19, 2023 •

Copy link
Copy Markdown
Contributor Author

The commit that introduced this include did so via IWYU. My guess is IWYU maybe got confused between arrow::Status and protobuf Status.

It's technically correct because the code is doing auto status = google::protobuf::JsonSomething... and then calling status.ok(). It needs to know that Status type.

@felipecrv
felipecrv deleted the pb branch May 19, 2023 17:11
@felipecrv felipecrv added this to the 12.0.1 milestone May 19, 2023
@ursabot

ursabot commented May 21, 2023

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 3fd8b88 and contender = b80c655. b80c655 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.18% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.98% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.75% ⬆️0.12%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] b80c6551 ec2-t3-xlarge-us-east-2
[Finished] b80c6551 test-mac-arm
[Finished] b80c6551 ursa-i9-9960x
[Finished] b80c6551 ursa-thinkcentre-m75q
[Finished] 3fd8b88b ec2-t3-xlarge-us-east-2
[Finished] 3fd8b88b test-mac-arm
[Finished] 3fd8b88b ursa-i9-9960x
[Finished] 3fd8b88b ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot

ursabot commented May 21, 2023

Copy link
Copy Markdown

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

raulcd pushed a commit that referenced this pull request May 30, 2023
…5673)

### Rationale for this change

Newer versions of protobuf use `absl::Status` instead of `google::protobuf::util::Status`. The status variables in this file are type-annotated with `auto` and we can count on the header that declares the status-returning function we are calling to have included the header that defines `Status`.

### What changes are included in this PR?

Removing an include of a protobuf header that don't exist in later versions of the library.

### Are these changes tested?

I haven't tried building with protobuf 23, but I can be sure this specifically fixes the problem reported in #35538.

Authored-by: Felipe Oliveira Carvalho <[email protected]>
Signed-off-by: Weston Pace <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants