Skip to content

Conversation

@mkarlesky
Copy link
Member

  1. If :defines or :flags config or mixin conventions mismatch (array vs. matcher hash), the array is promoted to the hash-style * matcher automatically with a notice logging this modification.
  2. An option has been added to the use of deep_merge() to handle the case of merging mixin single values into config arrays (typically a single string into an array of strings).
  3. If some oddball edge case slips through both of the above, Ceedling now logs a warning explaining which mixin value will clobber a config value in a merge.

- Automatically promote mixin or config :defines and :flags lists to `*` matchers if mixin and config conventions do not match.
- Enabled `:extend_existing_arrays` for `deep_merge()` to handle config / mixin merge cases of a value as a single string merged with an array of strings.
- Added merge warnings to log any oddball edge cases where a mixin value would silently clobber a config value
- Spoke to the design intent and recommendation to think in terms of additive merges
- Clarified merge rules
- Limited reorganization of headings
Copy link
Contributor

@Letme Letme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature. It would help with the migration from 0.31 version to 1.0 version. So LGTM.


Ceedling provides reasonably verbose logging at startup telling you which
configuration files were used and in what order they were merged.
configuration file and Mixins were used and in what order they were merged.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configuration file and Mixins were used and in what order they were merged.
configuration file and Mixins were used, and in what order they were merged.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comma here would not be correct grammar. A comma is only needed in a list of 3 or more items, for clarity / a pause, or to join two independent clauses (noun + verb sentences). None of these conditions are met.

Co-authored-by: Crt Mori <cmo@melexis.com>
@mkarlesky mkarlesky changed the title 1.1.0 Smarter Mixin Merges Smarter Mixin Merges Dec 20, 2025
@mkarlesky mkarlesky moved this from Backlog to Done in 1.0.n BugFix Releases Dec 20, 2025
`nullptr` is a recognized keyword in C23 and later. Use a name that does not collide while retaining the intended bad pointer dereferencing.
`bool` is a recognized keyword in C23 and later. Use `#include <stdbool.h>` as a version agnostic solution for use of `bool` as a type. This approach is backwards compatible to C99.
@mkarlesky mkarlesky merged commit 697cf62 into master Dec 20, 2025
11 checks passed
@mkarlesky mkarlesky deleted the feature/mixin_smarter_merges branch December 22, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants