-
Notifications
You must be signed in to change notification settings - Fork 4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(remodel): call ubergen to create aws-cdk-lib #24263
feat(remodel): call ubergen to create aws-cdk-lib #24263
Conversation
The remodel tool now calls some functions from ubergen in order to create the aws-cdk-lib package in a way that is consistent with how it is built today. Some differences from ubergen are required since it assumes that codegen has already taken place, and that L1s need to be extracted from experimental modules, which is not the case when working on aws-cdk-lib directly. Additionally makes a bunch of the functions in ubergen exported and changes them to rely on a passed configuration value instead of global variables, so that we can correctly call it in the directories that we want.
…eat/repo-restructure
…eat/repo-restructure
…eat/repo-restructure
…eat/repo-restructure
…eat/repo-restructure
…eat/repo-restructure-refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
reverting whitespace change to a file with no other changes, so that git history of most recent edit to this file will stay relevant
…git history of most recent edit to this file will stay relevant
…n the scope: inline the variable since its only used once
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
tools/@aws-cdk/cfn2ts/lib/index.ts
Outdated
/** | ||
* Map of CFN Scopes to modules | ||
*/ | ||
scopeMap: Record<string, string[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this type and the ModuleMap interface to represent almost the same thing I found really confusing. I think we should encapsulate the process of turning the json file into the ModuleMap
type. It's a bit hard to explain in comments, so I'm going to push to the branch to describe what I mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the commit here: d91b821
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good to merge this now! As long as you are good with the ModuleMap changes @MrArnoldPalmer
Updates the remodel package to correctly generate the
aws-cdk-lib
package source code. Exposes a bunch of functions from within theubergen
package, whichremodel
now calls in order to copy all of the expected packages from thepackages/@aws-cdk
directory intopackages/aws-cdk-lib/lib
while rewriting import paths within the source code.Additionally,
ubergen
returns a list of the bundled packages, which we use to build a map of the output directories to the correct cloudformation resource scopes. This is necessary because some scopes are repeated throughout different packages and are generated different depending on whether they are generated within a package that has other potentially related scopes, or not. This scope map is output toaws-cdk-lib/scripts/scope-map.json
for use during code generation.cfn2ts
now reads this scope map, and will update it with newly generated directories/scopes as needed.The
verify-imports-resolve-same
script currently fails. Investigating this separately as I believe the outputs are correct and it may just be a matter of adding additional entries to package.jsonexports
field.