Skip to content

chore(spanner): migrate to std::optional#16201

Open
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:migrate-spanner-optional
Open

chore(spanner): migrate to std::optional#16201
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:migrate-spanner-optional

Conversation

@colinmoy

Copy link
Copy Markdown

Replacing explicit usages of absl::optional with std::optional in the Spanner Client library as part of broader modernization efforts

@colinmoy colinmoy requested a review from a team as a code owner June 25, 2026 21:59
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Jun 25, 2026

@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 modernizes the Spanner client library by replacing the use of absl::optional and absl::nullopt with the C++17 standard library equivalents std::optional and std::nullopt across all source files, headers, tests, and samples. I have no feedback to provide as there are no review comments to assess.

@colinmoy colinmoy force-pushed the migrate-spanner-optional branch from ded609d to 275ecbd Compare June 25, 2026 22:31
@colinmoy colinmoy force-pushed the migrate-spanner-optional branch from 275ecbd to 48c0618 Compare June 25, 2026 22:38
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.10870% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.24%. Comparing base (e0b2850) to head (48c0618).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
google/cloud/spanner/samples/samples.cc 0.00% 4 Missing ⚠️
google/cloud/spanner/connection.cc 0.00% 2 Missing ⚠️
google/cloud/spanner/internal/connection_impl.cc 80.00% 2 Missing ⚠️
...cloud/spanner/internal/partial_result_set_source.h 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16201      +/-   ##
==========================================
- Coverage   92.24%   92.24%   -0.01%     
==========================================
  Files        2265     2265              
  Lines      210126   210125       -1     
==========================================
- Hits       193839   193831       -8     
- Misses      16287    16294       +7     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants