Skip to content

impl(testing_util): include algorithm header#16044

Merged
scotthart merged 1 commit intogoogleapis:mainfrom
whispersofthedawn:testing-util-include-algorithm
Mar 13, 2026
Merged

impl(testing_util): include algorithm header#16044
scotthart merged 1 commit intogoogleapis:mainfrom
whispersofthedawn:testing-util-include-algorithm

Conversation

@whispersofthedawn
Copy link
Contributor

@whispersofthedawn whispersofthedawn commented Mar 13, 2026

google/cloud/testing_util/command_line_parsing.cc appears to use std::transform without including <algorithm>. We encountered this in Nixpkgs; you can see some example build logs at the bottom of https://hydra.nixos.org/build/323365915/log (though that is on a somewhat older version, I believe we hit the same issue on a newer version). I'm not quite sure of the root cause of this error appearing now (it may be related to GCC 15), but I believe this is nonetheless a correct change.

`google/cloud/testing_util/command_line_parsing.cc` appears to use
`std::transform` without including `<algorithm>`. We encountered this
in Nixpkgs; you can see some example build logs at the bottom of
https://hydra.nixos.org/build/323365915/log. I'm not *quite* sure of the
root cause of this error appearing now (it may be related to GCC 15),
but I believe this is nonetheless a correct change.
@whispersofthedawn whispersofthedawn requested a review from a team as a code owner March 13, 2026 18:27
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a build failure in google/cloud/testing_util/command_line_parsing.cc by adding the necessary <algorithm> header. This ensures that std::transform is correctly declared, addressing compilation issues that have arisen in specific build environments, potentially related to newer compiler versions.

Highlights

  • Missing Header Inclusion: Included the <algorithm> header in google/cloud/testing_util/command_line_parsing.cc to explicitly declare std::transform, resolving a build error observed in certain environments.
Changelog
  • google/cloud/testing_util/command_line_parsing.cc
    • Added the <algorithm> header.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

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

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 adds the <algorithm> header to google/cloud/testing_util/command_line_parsing.cc. This change addresses a missing include for std::transform, which was causing build failures with some toolchains. The change is correct and I have no further feedback.

@scotthart
Copy link
Member

/gcbrun

@scotthart scotthart enabled auto-merge (squash) March 13, 2026 19:40
@whispersofthedawn
Copy link
Contributor Author

Hm, I'm looking at the failed xsan-pr run, and the failure seems unrelated (or at least I can't imagine why this PR would cause it). Is this expected/something I need to fix?

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.65%. Comparing base (702c057) to head (cfbd06a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16044      +/-   ##
==========================================
- Coverage   92.65%   92.65%   -0.01%     
==========================================
  Files        2339     2339              
  Lines      215290   215290              
==========================================
- Hits       199482   199474       -8     
- Misses      15808    15816       +8     

☔ View full report in Codecov by Sentry.
📢 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 merged commit 48196b1 into googleapis:main Mar 13, 2026
53 of 55 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.

3 participants