Add support for mixin composition#60
Open
ArizmendiWan wants to merge 2 commits intocolcon:masterfrom
Open
Conversation
Allow mixins to reference other mixins via a 'mixin' key containing a list of mixin names. Referenced mixins are resolved recursively with cycle detection, and their arguments are merged left-to-right before the composing mixin's own arguments are applied on top. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: ArizmendiWan <2311602492@qq.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #60 +/- ##
==========================================
+ Coverage 15.30% 19.09% +3.79%
==========================================
Files 11 11
Lines 562 597 +35
Branches 94 106 +12
==========================================
+ Hits 86 114 +28
- Misses 474 479 +5
- Partials 2 4 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Added a follow up commit to tighten mixin composition validation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows mixins to reference other mixins via a reserved
mixinkey. Resolves #39.A mixin definition can now include a list of other mixin names to compose:
Using --mixin debug-asan resolves all referenced mixins recursively before applying the mixin's own arguments. Precedence matches existing CLI --mixin behavior:
Also adds validation and tests for:
Existing mixin files without a mixin key are unaffected.