Repository navigation
Closed
Labels
bugThis issue is a bug.effort/mediumMedium work item βΒ a couple days of effortmodule/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"
},
Reacted by Nick Lynch, Greg, Julian Michel and Robert Goltz
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.effort/mediumMedium work item βΒ a couple days of effortmodule/compilerIssues affecting the JSII compilerp1
Activity
njlynch commentedon Sep 9, 2021
Another example: aws/aws-cdk#16443
chore: duplicate enum values not usable
chore: duplicate enum values not usable
chore: duplicate enum values not usable (#17731)
chore(release): 2.0.0-rc.33 (#17734)
fix(jsii): two enum members cannot have the same value
fix(jsii): fail compilation when two or more enum members have same vβ¦
fix(jsii): fail compilation when two or more enum members have same vβ¦
github-actions commentedon Jun 29, 2022
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.
chore: duplicate enum values not usable (aws#17731)
chore(release): 2.0.0-rc.33 (aws#17734)