Giter VIP home page Giter VIP logo

colcon-mixin-repository's Introduction

Repository of CLI mixins

Various command line options are tedious to write and/or difficult to remember. To make common command line options easier to invoke this repository makes these "shortcuts" available, e.g. for the command line tool colcon.

How to fetch the information

Prerequisite: get the mixin extension

First make sure you have installed the python3-colcon-mixin apt package, or the colcon-mixin pip package.

Register the hosted repository

To register this repository with colcon (using the identifier "default"), invoke the following command:

colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml

Afterwards as well as on a regular base fetch the latest content from the repository:

colcon mixin update default

Use a local mixin repository

The index as well as the mixins can also be local files. That is e.g. useful when iterating on the mixin files before publishing them:

git clone https://github.com/colcon/colcon-mixin-repository.git
colcon mixin add default file://`pwd`/colcon-mixin-repository/index.yaml

After editing either the index.yaml file or any of the .mixin files mixin update default needs to be run again.

How to use the information

To show the mixins available and their mapping invoke the following command:

colcon mixin show

To apply CLI mixins pass the option --mixin to the colcon verb followed by the names of the mixins.

How to contribute additional information

Initially fork this repository. For each contribution perform the following steps:

  • Create or modify one or multiple files ending with .mixin.
  • Add any new files in alphabetical order to the index.yaml file.
  • Run the lint.py script to ensure that the changes follow the recommended yaml style.
  • Create a pull request with the changes.

colcon-mixin-repository's People

Contributors

aalon avatar bhatsach avatar christhrasher avatar christophebedard avatar clalancette avatar cottsay avatar dhood avatar dirk-thomas avatar emersonknapp avatar hashb avatar jpsamper2009 avatar lucasw avatar mateus-amarante avatar mikaelarguedas avatar mjcarroll avatar ruffsl avatar tylerjw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

colcon-mixin-repository's Issues

Add compile-no-warning-as-error (CMake 3.24+)

Certain projects such as NAV2 enable warnings as errors, not just in CI, but also for local development.
There are good reasons for doing this because NAV2 has contributions by many new developers that might ignore compile warnings.

Currently, to disable this, on Ubuntu 22, there is nothing to change except temporarily the source code,which is easy to accidentally commit.

When I build nav2 on rolling, due to it always changing, a newly introduced deprecation warning will now trigger a build failure, which defeats the purpose of a deprecation warning allowing smooth transitions away from unused features.

In new versions of CMake (3.24+), there is a new feature: compile-no-warning-as-error: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-compile-no-warning-as-error

With Kitware's apt repository, it's easy to install newer versions of CMake on the OS.

Would colcon-mixin accept a contribution for this as a mixin, or would it be prohibited because it doesn't work on LTS platforms?

Missing documentation on the structure of mixins

I am trying to understand how mixin are structured and have been unable to find any documentation on this. Taking compile-commands.mixin as an example, I understand that build is the verb to which this mixin applies and that cmake-args refers to the CMake build system, but what does compile-commands refer to? Is this the name of a specific package?

{
    "build": {
        "compile-commands": {
            "cmake-args": [
                "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
                "--no-warn-unused-cli"
            ]
        }
    }
}

It would be great if a couple notes on this could be added to the README.md or over at readthedocs.

Question | Why does coverage.mixin not use `--coverage` ?

--coverage
This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs -ftest-coverage (when compiling) and -lgcov (when linking).
https://stackoverflow.com/questions/28840261/gcov-what-is-the-difference-between-coverage-and-ftest-coverage-when-buildi

Was there a particular reason why -lgcov (when linking) was not included in this .mixin?

"cmake-args": [
"-DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage'",
"-DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage'"

I'm unsure if this was deliberate, or a accidental omission in #8 .
Would switching the coverage.mixin to use --coverage be more obvious for gcc users?

colcon: error: argument verb_name: invalid choice: 'mixin' on Ubuntu 22

Request

Can you document how to add the mixin verb to colcon? I've installed ros-dev-tools per the ROS Ubuntu installation, but colcon does not come with mixin.

Logs

$ colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {build,extension-points,extensions,graph,info,list,metadata,test,test-result,version-check} ...
colcon: error: argument verb_name: invalid choice: 'mixin' (choose from 'build', 'extension-points', 'extensions', 'graph', 'info', 'list', 'metadata', 'test', 'test-result', 'version-check')

System Info

ROS version: Humble
Install method: Binaries

$ apt info ros-dev-tools
Package: ros-dev-tools
Version: 1.0.0
Priority: optional
Section: misc
Maintainer: Steven! Ragnarök <[email protected]>
Installed-Size: 9,216 B
Depends: ros-build-essential, python3-bloom, python3-colcon-common-extensions, python3-rosdep, python3-vcstool, wget
Homepage: https://github.com/ros-infrastructure/infra-variants
Download-Size: 1,748 B
APT-Manual-Installed: yes
APT-Sources: http://packages.ros.org/ros2/ubuntu jammy/main amd64 Packages
Description: Developer Tools for ROS
 Variant which includes packages generally useful during ROS development.

Suggestion

Add something to the README such as

sudo apt install python3-colcon-mixin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.