Skip to content

fix: dropping jsii.tsc.outDir breaks Java/Go transliteration for jsii-rosetta consumers - #2880

Merged
cdklabs-automation merged 1 commit into
10.xfrom
mrgrain/fix/constructs/restore-jsii-tsc-outdir
Aug 3, 2026
Merged

fix: dropping jsii.tsc.outDir breaks Java/Go transliteration for jsii-rosetta consumers#2880
cdklabs-automation merged 1 commit into
10.xfrom
mrgrain/fix/constructs/restore-jsii-tsc-outdir

Conversation

@mrgrain

@mrgrain mrgrain commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

With 10.8.0 (since deprecated), any tool using jsii-rosetta to transliterate TypeScript that imports constructs silently emits broken Java and Go imports: import constructs.Construct; instead of import software.constructs.Construct;, and a fabricated Go module path. The assembly loads fine and symbol lookup just degrades, so the bad output looks plausible.

10.8.0 replaced jsii.tsc: { outDir, rootDir } with jsii.tsconfig in package.json. Rosetta needs jsii.tsc.outDir to map the shipped lib/*.d.ts files back to the src/ symbol ids in the assembly, and has no fallback for it (aws/jsii-compiler#2740 tracks that gap). This restores the jsii.tsc block alongside jsii.tsconfig, and adds a test so a future upgrade cannot silently drop it again.

Fixes #2879

@mrgrain
mrgrain marked this pull request as draft August 3, 2026 10:47
auto-merge was automatically disabled August 3, 2026 10:47

Pull request was converted to draft

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

yarn.lock

PackageVersionLicenseIssue Type
jsii6.0.9NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
npm/jsii 6.0.9 UnknownUnknown

Scanned Files

  • yarn.lock

@mrgrain
mrgrain marked this pull request as ready for review August 3, 2026 13:51
@mrgrain
mrgrain force-pushed the mrgrain/fix/constructs/restore-jsii-tsc-outdir branch from 2f2211b to b63b692 Compare August 3, 2026 13:51
…-rosetta consumers

10.8.0 replaced `jsii.tsc: { outDir, rootDir }` with `jsii.tsconfig` +
`validateTsconfig` in package.json. Downstream jsii-rosetta consumers
read `jsii.tsc.outDir`/`rootDir` from the published package.json to map
the shipped `lib/*.d.ts` paths back to the `src/` symbol ids recorded in
the assembly. rootDir degrades gracefully via the assembly's
`metadata.tscRootDir`, but outDir has no fallback, so transliteration
silently emits incorrect Java and Go imports.

Restore the `jsii.tsc` block alongside `jsii.tsconfig` via a projen
override, and add a test asserting both fields are present in
package.json.

Fixes #2879
@mrgrain
mrgrain force-pushed the mrgrain/fix/constructs/restore-jsii-tsc-outdir branch from b63b692 to d3249f5 Compare August 3, 2026 14:01
@cdklabs-automation
cdklabs-automation added this pull request to the merge queue Aug 3, 2026
Merged via the queue into 10.x with commit 740480f Aug 3, 2026
13 checks passed
@cdklabs-automation
cdklabs-automation deleted the mrgrain/fix/constructs/restore-jsii-tsc-outdir branch August 3, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10.8.0 breaks Java/Go transliteration for downstream jsii-rosetta consumers

3 participants