Skip to content

Generator: Add missing std namespace to string arguments for Protobuf 3.20 compatibility #242

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

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Apr 10, 2022

🦟 Bug fix

Fixes the following error that occurs when building the library against Protobuf 3.20 :

[  0%] Building CXX object src/CMakeFiles/ign_msgs_gen.dir/Generator.cc.o
In file included from /home/conda/feedstock_root/build_artifacts/libignition-msgs5_1649622632208/work/src/Generator.cc:40:
/home/conda/feedstock_root/build_artifacts/libignition-msgs5_1649622632208/work/src/Generator.hh:47:21: error: 'string' does not name a type; did you mean 'strings'?
   47 |               const string &_parameter,
      |                     ^~~~~~
      |                     strings
/home/conda/feedstock_root/build_artifacts/libignition-msgs5_1649622632208/work/src/Generator.hh:49:15: error: 'string' has not been declared
   49 |               string *_error) const;
      |               ^~~~~~
/home/conda/feedstock_root/build_artifacts/libignition-msgs5_1649622632208/work/src/Generator.cc:70:38: error: 'string' does not name a type; did you mean 'strings'?
   70 |                                const string &/*_parameter*/,
      |                                      ^~~~~~
      |                                      strings

This was detected in conda-forge/libignition-msgs1-feedstock#73 .

Summary

Several uses of string were missing std::, probably with protobuf<3.20 everything was working just by chance.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@traversaro traversaro requested a review from caguero as a code owner April 10, 2022 20:49
@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🏰 citadel Ignition Citadel labels Apr 10, 2022
@codecov
Copy link

codecov bot commented Apr 10, 2022

Codecov Report

Merging #242 (0ab1146) into ign-msgs5 (d11fe38) will not change coverage.
The diff coverage is n/a.

❗ Current head 0ab1146 differs from pull request most recent head 0e87025. Consider uploading reports for the commit 0e87025 to get more accurate results

@@            Coverage Diff             @@
##           ign-msgs5     #242   +/-   ##
==========================================
  Coverage      85.27%   85.27%           
==========================================
  Files              9        9           
  Lines            903      903           
==========================================
  Hits             770      770           
  Misses           133      133           
Impacted Files Coverage Δ
src/Generator.cc 92.30% <ø> (ø)

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 d11fe38...0e87025. Read the comment docs.

@traversaro traversaro changed the title Generator: Add missing std namespace to string arguments Generator: Add missing std namespace to string arguments for Protobuf 3.20 compatibility Apr 10, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
@chapulina chapulina merged commit 914e7a3 into gazebosim:ign-msgs5 Apr 11, 2022
scpeters pushed a commit that referenced this pull request Jul 17, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
chapulina pushed a commit that referenced this pull request Jul 19, 2022
Signed-off-by: Silvio <silvio@traversaro.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel Gazebo 1️1️ Dependency of Gazebo classic version 11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants