ros2 / ros2/rosidl_python

cpplint checks fail for services and actions with buffers in the response/result

Open
#264 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
EmberScript
Stars
26
Forks
68
Avg merge
2d 13h
Merged PRs (30d)
1

Description

Generated by Generative AI

No

Operating System:

any

ROS version or commit hash:

rolling, lyrical

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

No response

Steps to reproduce issue

See #263

Expected behavior

Tests pass

Actual behavior

Tests fail

- rosidl_generator_py.cpplint_rosidl_generated_py build/include_order [4] (/ws/build/rosidl_generator_py/rosidl_generator_py/rosidl_generator_py/srv/_get_buffer_s.c:83)
  <<< failure message
    Found C system header after other header. Should be: _get_buffer_s.h, c system, c++ system, other.
  >>>
Additional information

#250 injects <stdint.h> into the headers, which might appear in the generated code after non-C headers, if the code is for services and actions, which have buffer type in their response/result/feedback, but not in the response/goal.

There are two simple fixes:

  1. silence build/include_order in the cpplint checks
  2. always add <stdint.h>

A more complicated fix would add stdint.h as in the request/goal part, if the parts use buffers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated rosidl_generator_py file build/.../rosidl_generator_py/srv/_get_buffer_s.c and the cpplint_rosidl_generated_py build/include_order failure. Compare the service/action generation described in #263 with the stdint.h injection from #250, including response/result/feedback versus request/goal handling. Done means the affected generated-code cpplint checks pass without introducing failures in the other cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.