-
Notifications
You must be signed in to change notification settings - Fork 263
Enums with duplicate values droppedΒ #2782
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.effort/mediumMedium work item βΒ a couple days of effortMedium work item βΒ a couple days of effortmodule/compilerIssues affecting the JSII compilerIssues affecting the JSII compilerp1
Description
π Bug Report
Affected Languages
- [ ]
TypeScriptorJavascript - [β
]
Python - [β
]
Java - [β
] .NET (
C#,F#, ...) - [β ]
Go
General Information
- JSII Version: 1.27.0
- Platform: OSX
What is the problem?
Originally reported in aws/aws-cdk#14059.
It appears that repeated values (not names) in enums are ignored, leading to dropped names. The example above is for SecretsManager.AttachmentTargetType:
Note that INSTANCE = 'AWS::RDS::DBInstance', and RDS_DB_INSTANCE = 'AWS::RDS::DBInstance', have different names, but the same values.
In the .jsii manifest generated for this module, the newer (non-deprecated) enums are not present:
Manifest:
"@aws-cdk/aws-secretsmanager.AttachmentTargetType": {
"assembly": "@aws-cdk/aws-secretsmanager",
"docs": {
"stability": "stable",
"summary": "The type of service or database that's being associated with the secret."
},
"fqn": "@aws-cdk/aws-secretsmanager.AttachmentTargetType",
"kind": "enum",
"locationInModule": {
"filename": "lib/secret.ts",
"line": 483
},
"members": [
{
"docs": {
"deprecated": "use RDS_DB_INSTANCE instead",
"stability": "deprecated",
"summary": "A database instance."
},
"name": "INSTANCE"
},
{
"docs": {
"deprecated": "use RDS_DB_CLUSTER instead",
"stability": "deprecated",
"summary": "A database cluster."
},
"name": "CLUSTER"
},
{
"docs": {
"stability": "stable",
"summary": "AWS::RDS::DBProxy."
},
"name": "RDS_DB_PROXY"
},
{
"docs": {
"stability": "stable",
"summary": "AWS::Redshift::Cluster."
},
"name": "REDSHIFT_CLUSTER"
},
{
"docs": {
"stability": "stable",
"summary": "AWS::DocDB::DBInstance."
},
"name": "DOCDB_DB_INSTANCE"
},
{
"docs": {
"stability": "stable",
"summary": "AWS::DocDB::DBCluster."
},
"name": "DOCDB_DB_CLUSTER"
}
],
"name": "AttachmentTargetType"
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.effort/mediumMedium work item βΒ a couple days of effortMedium work item βΒ a couple days of effortmodule/compilerIssues affecting the JSII compilerIssues affecting the JSII compilerp1