Skip to content

chore: migrate from deprecated absl types to std equivalents - #16400

Merged
scotthart merged 3 commits into
googleapis:mainfrom
scotthart:chore_absl_deprecated_to_std
Sep 1, 2026
Merged

chore: migrate from deprecated absl types to std equivalents#16400
scotthart merged 3 commits into
googleapis:mainfrom
scotthart:chore_absl_deprecated_to_std

Conversation

@scotthart

@scotthart scotthart commented Aug 27, 2026

Copy link
Copy Markdown
Member

There are no logic changes in this PR, simply updating to C++17 std types that used to use absl types. Changes in the use of auto will be made in a separate PR.

fixes #16354

@scotthart
scotthart requested review from a team as code owners August 27, 2026 23:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates various Abseil utilities (such as absl::variant, absl::visit, absl::holds_alternative, absl::get, absl::conjunction, absl::disjunction, and absl::void_t) to their standard C++17 library equivalents (std::variant, std::visit, etc.) across the codebase. The review feedback identifies a potential compilation failure in default_row_reader.cc due to mismatched return types, an unused Abseil header in list_objects_and_prefixes_reader.h, and a missed migration from absl::optional to std::optional in validate_metadata.cc.

Comment thread google/cloud/bigtable/internal/default_row_reader.cc
Comment thread google/cloud/storage/list_objects_and_prefixes_reader.h
Comment thread google/cloud/testing_util/validate_metadata.cc
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.42138% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.26%. Comparing base (f69f92f) to head (89b448d).

Files with missing lines Patch % Lines
...igquery/v2/minimal/internal/common_v2_resources.cc 60.00% 2 Missing ⚠️
google/cloud/internal/future_then_impl.h 50.00% 2 Missing ⚠️
...torage/internal/async/writer_connection_resumed.cc 83.33% 2 Missing ⚠️
google/cloud/testing_util/is_proto_equal.cc 66.66% 2 Missing ⚠️
..._tests/golden/v1/golden_kitchen_sink_connection.cc 0.00% 1 Missing ⚠️
generator/internal/http_option_utils.cc 80.00% 1 Missing ⚠️
generator/internal/longrunning.cc 91.66% 1 Missing ⚠️
generator/internal/metadata_decorator_generator.cc 0.00% 1 Missing ⚠️
...ator/internal/metadata_decorator_rest_generator.cc 0.00% 1 Missing ⚠️
...bigquery/v2/minimal/internal/dataset_connection.cc 0.00% 1 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16400      +/-   ##
==========================================
+ Coverage   92.24%   92.26%   +0.01%     
==========================================
  Files        2246     2246              
  Lines      212136   212135       -1     
==========================================
+ Hits       195692   195719      +27     
+ Misses      16444    16416      -28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart
scotthart marked this pull request as draft August 31, 2026 18:31
@scotthart
scotthart force-pushed the chore_absl_deprecated_to_std branch from 34c632d to 8bf8fc3 Compare August 31, 2026 18:33
@scotthart
scotthart marked this pull request as ready for review August 31, 2026 23:52
@scotthart

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the codebase from Abseil's variant, optional, and related utilities to their standard C++17 library equivalents, updating both source files and build configurations (Bazel and CMake). The review feedback focuses on enforcing the repository's style guide regarding type deduction (auto). Specifically, it highlights multiple instances where auto is used inappropriately, such as when it obscures domain objects (like Status, ReadPayload, and ObjectMetadata), hides primitive/scalar types, or leads to unnecessary copies instead of using const&.

Comment thread generator/internal/http_option_utils.cc
Comment thread google/cloud/bigtable/internal/default_row_reader.cc
Comment thread google/cloud/storage/internal/async/reader_connection_resume.cc
Comment thread google/cloud/storage/internal/async/writer_connection_impl.cc
Comment thread google/cloud/storage/internal/async/writer_connection_impl.cc
Comment thread google/cloud/storage/tests/async_client_integration_test.cc
Comment thread google/cloud/storage/tests/object_integration_test.cc
Comment thread google/cloud/storage/tests/object_integration_test.cc
Comment thread google/cloud/storage/tests/object_integration_test.cc
Comment thread google/cloud/storage/tests/object_integration_test.cc
@scotthart
scotthart merged commit 7ab3923 into googleapis:main Sep 1, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation warnings with Abseil 20260526.0 cause build failures with -Werror

2 participants