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

fix: add missing <cstdint> includes #10421

Merged
merged 1 commit into from
Dec 10, 2022
Merged

fix: add missing <cstdint> includes #10421

merged 1 commit into from
Dec 10, 2022

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Dec 10, 2022

Without the change build fails on this week's gcc-13 as:

In file included from google/cloud/internal/curl_handle.cc:15:
google/cloud/internal/curl_handle.h:107:8:
  error: 'int32_t' in namespace 'std' does not name a type
  107 |   std::int32_t GetResponseCode();
      |        ^~~~~~~

gcc-13 cleaned up <string> not to include <cstdint> for newer c++ standards. Hence the build failures.


This change is Reviewable

@trofi trofi requested a review from a team as a code owner December 10, 2022 21:48
@coryan
Copy link
Contributor

coryan commented Dec 10, 2022

/gcbrun

@coryan coryan changed the title google/cloud: add missing <cstdint> includes fix: add missing <cstdint> includes Dec 10, 2022
@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented Dec 10, 2022

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@coryan coryan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 081386c1fce4a888b188fcc89cb5d0f7a1234da5

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@google-cloud-cpp-bot google-cloud-cpp-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2022
@coryan
Copy link
Contributor

coryan commented Dec 10, 2022

Thanks for the PR! Seems like the robots think you need to sort some headers. The build logs are listed above, but they are tricky to find, so here is a direct link:

https://storage.googleapis.com/cloud-cpp-community-publiclogs/logs/google-cloud-cpp/10421/081386c1fce4a888b188fcc89cb5d0f7a1234da5/checkers-checkers/log-06f36380-a1f3-4b44-8ea2-f1342a8a712a.txt

Are you using a particular Linux distro to build with GCC 13? I would like to expand our build matrix to cover this case, and I would also like to avoid installing GCC from source.

@trofi
Copy link
Contributor Author

trofi commented Dec 10, 2022

I'm afraid I'm using locally built gcc-13. Other people used ubuntu's ppa with weekly gcc snapshots, but I'm not familiar with precise locations of those. I wonder if include-what-you-use could provide a similar signal for missing headers.

Applied the following header sorting and force-pushed:

Step #3: -#include <cstdint>
Step #3:  #include <chrono>
Step #3: +#include <cstdint>

Thank you!

@coryan
Copy link
Contributor

coryan commented Dec 10, 2022

/gcbrun

Without the change build fails on this week's `gcc-13` as:

    In file included from google/cloud/internal/curl_handle.cc:15:
    google/cloud/internal/curl_handle.h:107:8:
      error: 'int32_t' in namespace 'std' does not name a type
      107 |   std::int32_t GetResponseCode();
          |        ^~~~~~~

`gcc-13` cleaned up `<string>` not to include `<cstdint>` for
newer c++ standards. Hence the build failures.
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 3632510adb81f2c52478b4d5b75d43c25670b3c5

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@trofi
Copy link
Contributor Author

trofi commented Dec 10, 2022

Fixed commit message to match PR (now has fix: ... prefix)

@coryan
Copy link
Contributor

coryan commented Dec 10, 2022

/gcbrun

@coryan coryan added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2022
@google-cloud-cpp-bot google-cloud-cpp-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 10, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 8cca9965feeaf29fbfc4366b53a139e5c639c4b9

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Dec 10, 2022

Codecov Report

Base: 93.86% // Head: 93.86% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (8cca996) compared to base (5af495b).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10421      +/-   ##
==========================================
- Coverage   93.86%   93.86%   -0.01%     
==========================================
  Files        1610     1610              
  Lines      145830   145830              
==========================================
- Hits       136888   136887       -1     
- Misses       8942     8943       +1     
Impacted Files Coverage Δ
google/cloud/internal/curl_handle.h 100.00% <ø> (ø)
google/cloud/internal/oauth2_credentials.h 33.33% <ø> (ø)
google/cloud/internal/rest_response.h 100.00% <ø> (ø)
google/cloud/pubsub/ack_handler.h 78.57% <ø> (ø)
google/cloud/storage/bucket_cors_entry.h 80.00% <ø> (ø)
google/cloud/storage/internal/hash_function_impl.h 66.66% <ø> (ø)
google/cloud/storage/internal/object_read_source.h 66.66% <ø> (ø)
...bigtable/examples/bigtable_hello_instance_admin.cc 81.00% <0.00%> (-2.00%) ⬇️
google/cloud/bigtable/async_read_stream_test.cc 97.32% <0.00%> (-0.67%) ⬇️
google/cloud/completion_queue_test.cc 97.13% <0.00%> (-0.20%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan coryan merged commit 4fc780c into googleapis:main Dec 10, 2022
@coryan
Copy link
Contributor

coryan commented Dec 10, 2022

Thanks again for the PR

@trofi trofi deleted the gcc-13-cstdint branch December 11, 2022 00:47
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.

3 participants