You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a deprecated member was nested under a collection of values, no
deprecation warning was being generated, despite all the necessary
information being available.
There was a missing case that caused the collection to be validated as
if it was the element type, which is obviously incorrect, but thankfully
did not cause errors as it typically led to verifying `undefined`, which
silently succeeds.
Added the necessary code so that collections are deep-validated as they
should have been.
Fixes#3755
When a deprecated member was nested under a collection of values, no deprecation warning was being generated, despite all the necessary information being available.
There was a missing case that caused the collection to be validated as if it was the element type, which is obviously incorrect, but thankfully did not cause errors as it typically led to verifying `undefined`, which silently succeeds.
Added the necessary code so that collections are deep-validated as they should have been.
Fixes#3755
---
By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].
[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When a property is deprecated, and that property is used in an interface that is part of a list, deprecation warnings (or failures) are not generated.
For example,
cdk.aws_ec2.SubnetType.ISOLATED
is deprecated, but if you use it as part ofSubnetConfiguration
like this:warnings are not generated.
Expected Behavior
A warning should be generated:
Current Behavior
No warning has been generated.
Reproduction Steps
Create a CDK v1 application.
Create a VPC using a deprecated
SubnetType
:Run
npx cdk synth
Possible Solution
It looks like we are not correctly handling cases where we deprecate properties that exist in a list of intefaces.
The function in .warnings.jsii.js
Should be something like
Additional Information/Context
Original issue aws/aws-cdk#22066
SDK version used
CDK v1.172.0
Environment details (OS name and version, etc.)
Ubuntu
The text was updated successfully, but these errors were encountered: