feat(cross): union augment lists across layers#111
Merged
Conversation
augment lists were replaced when a derived layer declared its own, so an augment defined once in a lower layer was lost. Only sysroot.dev_packages accumulated. Union augment the same way in both merge paths: - _mergeCross (the extends chain: app -> project -> board) - the shared -> target merge (a cross.targets variant, or a .emb/base.emb.yaml shared block folding into each target) base entries first (order-preserving), a derived entry replaces a base entry that names the same pkg, and a new pkg appends. This lets a shared augment (e.g. an ivi-homescreen crash handler defined once in .emb/base.emb.yaml) survive a target that also declares its own augment (e.g. libdisplay-info), instead of one silently dropping the other. Document the rule in the README and the raspberry-pi-family example. Tests cover the union across the extends layer and the shared -> target merge, plus the same-pkg override. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
jwinarske
force-pushed
the
jw/cross-augment-union
branch
from
July 10, 2026 23:26
21b2be1 to
934ad7a
Compare
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.
augmentlists were replaced onextends/override, so a project or applayer that declared its own
augmentlost any augment inherited from the layer below it. Onlysysroot.dev_packagesaccumulated across the chain — an inconsistency that makes a shared, inheritable augment impossible.Change
Union
augmentin_mergeCross, mirroring the existingdev_packagesrule: base entries first (order-preserving), a derived entry replaces a base entry that names the samepkg, and a newpkgappends.This lets a shared augment defined once — e.g. an ivi-homescreen crash handler (sentry-native, gated on
BUILD_CRASH_HANDLER) — survive a board or target that also declares its own augment (e.g.libdisplay-info), instead of one silently dropping the other.Docs + tests
raspberry-pi-familyexample note thataugmentunions likedev_packages(same-pkgreplaces).cross_project_test.dartcovers the union of distinct pkgs and the same-pkgoverride across the board layer.