Skip to content
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

Add mixin compositing #39

Open
AlexisTM opened this issue Apr 20, 2022 · 1 comment
Open

Add mixin compositing #39

AlexisTM opened this issue Apr 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@AlexisTM
Copy link

Introduction

In our project, we would like to create mixins from other mixins.

What that means is: When using main-mixin, we want to use a set of mixins.

This allows for a single mixin to be defining, let's say: The output folders, the toolchain, specific build functions (prod build vs dev build), etc.

Example

Currently, I am making the main-mixin with all the default commands, output directory & co, but changing some arguments by using another mixin before it. For example:

{
    "build": {
        "legacy": {
            "cmake-args": [], // Many things here
            "install-base": "/opt/company/workspace/install/legacy",
            "build-base": "/opt/company/workspace/build/legacy",
            "log-base": "/opt/company/workspace/log/legacy",
        },
        "thirdparty": {
            "install-base": "/opt/company/thirdparty/install/legacy",
            "build-base": "/opt/company/thirdparty/build/legacy",
            "log-base": "/opt/company/thirdparty/log/legacy",
        },
    }
}

Would be called as: colcon build --mixin thirdparty legacy.

Prefered solution

{
    "build": {
        "main": {
            "cmake-args": [], // Many things here
            "mixin": ["legacy_folder"],
        },
        "debug": {
            "cmake-args": [], // Many things here
            "mixin": ["legacy_folder", "asan", "ubsan"],
        },
        "thirdparty": {
            "cmake-args": [], // Many things here
            "mixin": ["thirdparty_folder"],
        },
        "legacy_folder": {
            "install-base": "/opt/company/workspace/install/legacy",
            "build-base": "/opt/company/workspace/build/legacy",
            "log-base": "/opt/company/workspace/log/legacy",
        },
        "thirdparty_folder": {
            "install-base": "/opt/company/thirdparty/install/legacy",
            "build-base": "/opt/company/thirdparty/build/legacy",
            "log-base": "/opt/company/thirdparty/log/legacy",
        },
    }
}
@cottsay cottsay added the enhancement New feature or request label Feb 3, 2024
@giuliano-97
Copy link

oh this would be a very very useful feature, is there any plan in the roadmap to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants