rosidl_generator_py: linters are exec_depends although generated-code lint tests are opt-in
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- cmake, python
- Domínio
- build-system
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- EmberScript
- Estrelas
- 26
- Forks
- 75
- Merge médio
- 6d 7h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ros2/rosidl_python
-
Eliminate array resetting loop in _msg_support.c.emTalvez já em andamento @Lidang-Jiang assumiu há 216 dias. Abertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ros2/rosidl_python#255 · 1 reação ·
-
Generated message fails when a fixed-size array message has a field named range (shadowing built-in)Talvez já em andamento @Rahul-cs50 assumiu há 20 dias. Abertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 54/100
ros2/rosidl_python#275 ·
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 56/100
ros2/rosidl_python#264 · 2 comentários ·
-
Message named pkg/Duration with field builtin_interfaces/Duration is invalidTalvez já em andamento @Lidang-Jiang assumiu há 215 dias. Abertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
ros2/rosidl_python#257 · 8 comentários ·
-
enhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
ros2/rosidl_python#242 ·
Todas as issues de ros2/rosidl_python
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
Mantenedores costumam responder em até 3 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
metanorma/metanorma#768 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ehmpathy/declapract-typescript-ehmpathy#891 ·
Mantenedores costumam responder em até 2 dias
-
backlog
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
sagemathinc/sagebrush#2768 ·
Mantenedores costumam responder em até 1 dia