Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel incorrectly serializes ENUM values #753

Closed
3 of 4 tasks
RomainMuller opened this issue Aug 29, 2019 · 0 comments 路 Fixed by #754
Closed
3 of 4 tasks

Kernel incorrectly serializes ENUM values #753

RomainMuller opened this issue Aug 29, 2019 · 0 comments 路 Fixed by #754
Assignees
Labels
bug This issue is a bug. module/kernel Issues affecting the `jsii-kernel` module

Comments

@RomainMuller
Copy link
Contributor

RomainMuller commented Aug 29, 2019

馃悰 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)

General Information

  • JSII Version: 0.15.2
  • Platform: Independent

What is the problem?

The JSII kernel incorrectly serializes enum values for which the string equivalent does not correspond to the label (e.g: LABEL = 'Label'). Those result in the token containing undefined (the literal string) at the value part.

This causes aws/aws-cdk#3774

@RomainMuller RomainMuller added bug This issue is a bug. module/kernel Issues affecting the `jsii-kernel` module labels Aug 29, 2019
@RomainMuller RomainMuller self-assigned this Aug 29, 2019
RomainMuller added a commit that referenced this issue Aug 29, 2019
When string-valued enums were serialized, an incorrect reference would
be created if the label of the enum entry did not match it's string
value; due to the lookup code being incorrect.

Updated a string-valued enum and introduced new compliance tests to
ensure such enum values are passed across correctly.

Fixes #753
RomainMuller added a commit that referenced this issue Aug 29, 2019
When string-valued enums were serialized, an incorrect reference would
be created if the label of the enum entry did not match it's string
value; due to the lookup code being incorrect.

Updated a string-valued enum and introduced new compliance tests to
ensure such enum values are passed across correctly.

Fixes #753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/kernel Issues affecting the `jsii-kernel` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant