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

feat!: add a dep on Abseil #4087

Merged
merged 5 commits into from
May 12, 2020
Merged

feat!: add a dep on Abseil #4087

merged 5 commits into from
May 12, 2020

Conversation

devjgm
Copy link
Contributor

@devjgm devjgm commented May 12, 2020

Fixes: #2309

Adds a dep on Abseil. Uses absl::make_unique in one test in Spanner just to show that the Abseil dep is working in all the builds.

This change is Reviewable

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 12, 2020
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

Merging #4087 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4087   +/-   ##
=======================================
  Coverage   93.34%   93.34%           
=======================================
  Files         834      835    +1     
  Lines       64928    64884   -44     
=======================================
- Hits        60607    60566   -41     
+ Misses       4321     4318    -3     
Impacted Files Coverage Δ
google/cloud/spanner/results_test.cc 93.75% <100.00%> (ø)
google/cloud/storage/oauth2/credentials.h 33.33% <0.00%> (-33.34%) ⬇️
google/cloud/storage/internal/curl_handle.h 68.18% <0.00%> (-31.82%) ⬇️
...oogle/cloud/storage/internal/curl_handle_factory.h 50.00% <0.00%> (-30.00%) ⬇️
google/cloud/testing_util/assert_ok.cc 80.00% <0.00%> (-20.00%) ⬇️
google/cloud/spanner/internal/log_wrapper.h 71.42% <0.00%> (-13.19%) ⬇️
google/cloud/internal/async_retry_unary_rpc.h 75.51% <0.00%> (-6.13%) ⬇️
...storage/benchmarks/storage_throughput_benchmark.cc 83.63% <0.00%> (-5.66%) ⬇️
google/cloud/storage/bucket_metadata.h 99.41% <0.00%> (-0.02%) ⬇️
google/cloud/optional.h 100.00% <0.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f9ab3b...3f50b82. Read the comment docs.

@devjgm devjgm changed the title Abseil dep feat!: adds a dep on Abseil May 12, 2020
@devjgm devjgm changed the title feat!: adds a dep on Abseil feat!: add a dep on Abseil May 12, 2020
Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Reviewed 16 of 17 files at r1, 2 of 2 files at r2.
Reviewable status: 18 of 19 files reviewed, all discussions resolved


.clang-format, line 17 at r2 (raw file):

- Regex: '^\"google/cloud/'  # project includes should sort first
  Priority: 500
- Regex: '^\"'

FYI, by including abseil using #include "abseil/...." we are missing out on this:

https://github.com/googleapis/google-cloud-cpp-pubsub/blob/6db6162cb6bbe9bedb04933ef8ec073386dbda7f/cmake/EnableWerror.cmake#L29-L39

That allows us to increase the warning level in our code, even if our dependencies are not ready.


super/CMakeLists.txt, line 55 at r2 (raw file):

set(GOOGLE_CLOUD_CPP_DEPENDENCIES_LIST
    abseil-cpp-project

FYI, when we upgrade grpc-project we need to change its deps to add abseil-cpp-project to them.

@devjgm
Copy link
Contributor Author

devjgm commented May 12, 2020

Reviewed 16 of 17 files at r1, 2 of 2 files at r2.
Reviewable status: 18 of 19 files reviewed, all discussions resolved

.clang-format, line 17 at r2 (raw file):

- Regex: '^\"google/cloud/'  # project includes should sort first
  Priority: 500
- Regex: '^\"'

FYI, by including abseil using #include "abseil/...." we are missing out on this:

https://github.com/googleapis/google-cloud-cpp-pubsub/blob/6db6162cb6bbe9bedb04933ef8ec073386dbda7f/cmake/EnableWerror.cmake#L29-L39

That allows us to increase the warning level in our code, even if our dependencies are not ready.

Including Abseil headers with angle brackets breaks the bazel builds. I know we talked about making this work with them, but it was either forgotten or it was decided not to do it.

If our build breaks because of warnings in Abseil headers, we could file issues and escalate to them. They'll likely either need to fix the breakages quickly or perhaps enable angle-bracket includes.

Or we could avoid the dep until they enable angle-bracket includes of their headers (Note: we currently don't support angle-bracket includes of our headers in bazel builds either).

WDYT?

super/CMakeLists.txt, line 55 at r2 (raw file):

set(GOOGLE_CLOUD_CPP_DEPENDENCIES_LIST
    abseil-cpp-project

FYI, when we upgrade grpc-project we need to change its deps to add abseil-cpp-project to them.

Gotcha. Thanks.

@devjgm devjgm marked this pull request as ready for review May 12, 2020 13:41
@devjgm devjgm requested a review from a team as a code owner May 12, 2020 13:41
Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 17 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


.clang-format, line 17 at r2 (raw file):

Previously, devjgm (Greg Miller) wrote…

Including Abseil headers with angle brackets breaks the bazel builds. I know we talked about making this work with them, but it was either forgotten or it was decided not to do it.

If our build breaks because of warnings in Abseil headers, we could file issues and escalate to them. They'll likely either need to fix the breakages quickly or perhaps enable angle-bracket includes.

Or we could avoid the dep until they enable angle-bracket includes of their headers (Note: we currently don't support angle-bracket includes of our headers in bazel builds either).

WDYT?

SGTM. FYI, I am preparing a PR to start using -Werror on Windows (we were not, it finds some useful stuff).

@devjgm devjgm merged commit e1b030c into googleapis:master May 12, 2020
@devjgm devjgm deleted the abseil-dep branch May 12, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Abseil dep in cmake and bazel
3 participants