rosidl_generator_py: linters are exec_depends although generated-code lint tests are opt-in
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cmake, python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start by comparing the linter dependency declarations in rosidl_generator_py/package.xml with the opt-in linter block in rosidl_generator_c, then read rosidl_generator_py_generate_interfaces.cmake and the ADD_LINTER_TESTS documentation. The proposal is to move the five linters to test dependencies and add an actionable configure error naming the required dependency. Done means opt-in users get that guidance and ordinary installs no longer pull in the linters.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
rosidl_generator_py/package.xml has five linter packages as <exec_depend>: ament_cmake_cpplint, ament_cmake_flake8, ament_cmake_mypy, ament_cmake_pep257 and ament_cmake_uncrustify on rolling (ament_cmake_cppcheck in place of ament_cmake_mypy on jazzy). They were added in #199 to fix #198. A package that passed ADD_LINTER_TESTS to rosidl_generate_interfaces() failed to configure because it did not depend on ament_cmake_flake8 itself. The comment in package.xml already notes they are only needed by downstream tests.
rosidl_core_runtime has rosidl_generator_py as a build_export_depend, so every binary install that contains a message package also installs the five linters and what they pull in. A deployment that never builds message packages never uses them. (We currently repack rosidl_generator_py without them for our production environment.)
rosidl_generator_c has the same opt-in block (if(BUILD_TESTING AND rosidl_generate_interfaces_ADD_LINTER_TESTS) followed by find_package(ament_cmake_cpplint REQUIRED)), but no linter exec_depend. A package that opts in there declares the linters as its own test dependencies.
Proposal
Handle rosidl_generator_py the way rosidl_generator_c does:
- Move the five linters from
<exec_depend>to<test_depend>. - In
rosidl_generator_py_generate_interfaces.cmake, keepfind_package(... REQUIRED)but add a clear configure error naming the<test_depend>to add, so the #198 case fails with an actionable message. - Mention in the
ADD_LINTER_TESTSdocumentation that the calling package musttest_dependon the linters (orament_lint_common).
ADD_LINTER_TESTS is off by default, so only packages that opt in are affected. If maintainers prefer to keep the dependencies until a test_export_depend exists, an alternative is find_package(... QUIET) with a warning that skips the generated-code lint tests when a linter is missing.
I can open a PR if this direction is acceptable.
- Ngôn ngữ chính
- EmberScript
- Star
- 26
- Fork
- 75
- Merge trung bình
- 6 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ros2/rosidl_python
-
Eliminate array resetting loop in _msg_support.c.emCó thể đã có người làm @Lidang-Jiang đã nhận 216 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ros2/rosidl_python#255 · 1 reaction ·
-
Generated message fails when a fixed-size array message has a field named range (shadowing built-in)Có thể đã có người làm @Rahul-cs50 đã nhận 20 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
ros2/rosidl_python#275 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
ros2/rosidl_python#264 · 2 bình luận ·
-
Message named pkg/Duration with field builtin_interfaces/Duration is invalidCó thể đã có người làm @Lidang-Jiang đã nhận 215 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
ros2/rosidl_python#257 · 8 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
ros2/rosidl_python#242 ·
Tất cả issue của ros2/rosidl_python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
metanorma/metanorma#768 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ehmpathy/declapract-typescript-ehmpathy#891 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
backlog
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sagemathinc/sagebrush#2768 ·
Maintainer thường phản hồi trong vòng 1 ngày