Skip to content

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Nov 11, 2025

Reason for this change

Currently, .jsiirc.json files in aws-cdk-lib submodules contain historical naming deviations (e.g., Amazon.CDK.AWS.Sagemaker instead of the standard Amazon.CDK.AWS.SageMaker). These files are manually maintained and scattered across hundreds of subdirectories, making it:

  • Difficult to discover what deviations exist and why
  • Risky to change because there's no central source of truth
  • Hard to maintain consistency when adding new modules
  • Impossible to audit without checking every subdirectory

This creates technical debt and makes it harder to evolve the codebase.

Description of changes

Centralizes all jsii target configurations into a single scope-map.json file that serves as the source of truth. The submodule generation script now always regenerates .jsiirc.json files from this central configuration, ensuring consistency and making deviations explicit and auditable.

Supporting changes:

  • Created module-topology.ts to manage the scope map
  • Moved jsii utilities from util/pkglint.ts to util/jsii.ts
  • Removed unused cfn2ts CLI tool
  • Updated all imports to use the new module topology exports

This makes historical deviations visible in one place and prevents future drift.

Describe any new or updated permissions being added

No new permissions are being added.

Description of how you validated changes

  • Verified that the scope-map.json correctly captures all existing module configurations
  • Confirmed that regenerated .jsiirc.json files match the expected format
  • Ensured all imports and type references were updated correctly

Basically the proof that this works is that (aside from scope-map.json) only codegen files have changed. In particular jsii-diff doesn't report anything and no .jsiirc.json files changed.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Nov 11, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 11, 2025 21:38
@mrgrain mrgrain changed the title chore: scope map chore: centralize storage of submodule names Nov 11, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 11, 2025
@mergify
Copy link
Contributor

mergify bot commented Nov 12, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit f96e94c into main Nov 12, 2025
24 of 25 checks passed
@mergify mergify bot deleted the mrgrain/chore/centralize/jsiirc-json-differences branch November 12, 2025 08:41
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants