Conversation
…nentsV2 Restrict `components` to a flat `Array<Component>` (OR-only) and introduce `componentsV2` as `Array<Component | Component[]>` for Disjunctive Normal Form (OR of ANDs) matching. The `componentsV2` field is only used when `schemaVersion` is `'2'`, with a fallback to `components` when absent.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1166 +/- ##
=======================================
Coverage 87.76% 87.76%
=======================================
Files 72 72
Lines 10137 10137
Branches 1339 1339
=======================================
Hits 8897 8897
Misses 1215 1215
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
otaviomacedo
approved these changes
Feb 23, 2026
github-merge-queue bot
pushed a commit
to cdklabs/aws-cdk-notices
that referenced
this pull request
Feb 23, 2026
…atible DNF notices (#1049) Redo of #1042 using `schemaVersion` `"2"` and `componentsV2` for backwards compatibility. Constructs 10.5.0 introduced changes that require updated JSII language bindings. .NET and Go CDK libraries at version 2.238.0 and below don't have these bindings yet, causing JSII runtime failures at build time. This notice tells affected users to stay on Constructs 10.4.5 until they can upgrade their CDK library to 2.239.0 or later. The notice uses AND-grouped components to target only the specific combinations that are actually broken, rather than matching all .NET and Go users regardless of their framework version. This requires Disjunctive Normal Form (DNF) in the components field, which is expressed as nested arrays. The previous attempt in #1042 put the nested arrays directly in `components`. However, CLI versions 2.1000.0 and older don't understand nested arrays and fail to process these notices correctly. To solve this, the notice now uses `schemaVersion` `"2"` with a new `componentsV2` field for the DNF data, while `components` is left as an empty array. Older CLIs will safely skip the notice since it has no matching components, while newer CLIs (see [aws/aws-cdk-cli#1166](aws/aws-cdk-cli#1166)) read the DNF data from `componentsV2`. The validator and README are updated to enforce and document these constraints.
github-merge-queue bot
pushed a commit
to cdklabs/aws-cdk-notices
that referenced
this pull request
Feb 23, 2026
Redo of #1042 using `schemaVersion` `"2"` and `componentsV2` for backwards compatibility. Constructs 10.5.0 introduced changes that require updated JSII language bindings. .NET and Go CDK libraries at version 2.238.0 and below don't have these bindings yet, causing JSII runtime failures at build time. This notice tells affected users to stay on Constructs 10.4.5 until they can upgrade their CDK library to 2.239.0 or later. The notice uses AND-grouped components to target only the specific combinations that are actually broken, rather than matching all .NET and Go users regardless of their framework version. This requires Disjunctive Normal Form (DNF) in the components field, which is expressed as nested arrays. The previous attempt in #1042 put the nested arrays directly in `components`. However, CLI versions 2.1000.0 and older don't understand nested arrays and fail to process these notices correctly. To solve this, the notice now uses `schemaVersion` `"2"` with a new `componentsV2` field for the DNF data, while `components` is left as an empty array. Older CLIs will safely skip the notice since it has no matching components, while newer CLIs (see [aws/aws-cdk-cli#1166](aws/aws-cdk-cli#1166)) read the DNF data from `componentsV2`. The validator and README are updated to enforce and document these constraints.
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.
DNF (Disjunctive Normal Form) component matching was introduced in #128. The
componentsfield was typed asArray<Component | Component[]>, which made it look like DNF was fully supported. Based on this, new notices with nested component arrays were published to the data source. However, CLI versions 2.1000.0 and older do not understand nested arrays incomponentsand fail to process these notices correctly, causing a regression for users on older CLI versions.Instead we will be using
schemaVersionto gate support for this new feature. Thecomponentsfield is now again (correctly) typed as a flatArray<Component>(OR-only), which is all that schema version 1 ever supported. A newcomponentsV2field (Array<Component | Component[]>) carries the DNF data and is only read whenschemaVersionis'2'. This way, older CLIs that don't know aboutcomponentsV2will simply ignore it and continue to work with the flatcomponentsarray, while newer CLIs can take advantage of the full DNF matching throughcomponentsV2.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license