aws / aws/jsii

C#: JSII-Pacmak adds extra }

Open
#4,299 0 comments 0 reactions 0 assignees View on GitHub
bug p1
Dominant language
TypeScript
Stars
2.9k
Forks
267
Avg merge
1d 25m
Merged PRs (30d)
14

Description

### Describe the bug

When we run `jsii-pacmak -v --target dotnet` in the build process of [cdktf-provider-oci](https://github.com/cdktf/cdktf-provider-oci) we run into ~50 errors across all sorts of resouces that all appear to have one or two extra `}` at the end the file.

### Expected Behavior

Compiling the bindings from the source TS correctly for C#

### Current Behavior

[This gist](https://gist.github.com/DanielMSchmidt/3dfefaeeff2c5d532ed95589db70a6b5) shows one example of a TS file and a corresponding C# file, at the very end of the C# file you can see two extra `}`.

### Reproduction Steps

- Create new project with cdktf 0.18.2 (or any recent version) and constructs installed
- [This gist](https://gist.github.com/DanielMSchmidt/3dfefaeeff2c5d532ed95589db70a6b5) Copy the TS file of the gist.
- Run pacmak against it, see the error

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### SDK version used

jsii@5.2.17, jsii-pacmak@1.90.0

### Environment details (OS name and version, etc.)

OSX Ventura & Ubuntu on GH Runner

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Reproduce the issue with jsii-pacmak -v --target dotnet using the TypeScript example from the linked gist, then trace the generated C# output and confirm that the extra closing braces are absent and the bindings compile successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.