-
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): make codegen handle cfn-include cfn2ts-cfn-include-map #24377
feat(remodel): make codegen handle cfn-include cfn2ts-cfn-include-map #24377
Conversation
Adds functionality to cfn2ts and aws-cdk-lib gen.ts to correctly generate the map of cloudformation resource type names, to classes within aws-cdk-lib. this was previously handled by a build script in @aws-cdk/aws-cloudformation-include, but that depended on all of the individual @aws-cdk/ packages being built and parsing the code using the JSII assembly and jsii-reflect. This is not possible anymore because we can't assure aws-cdk-lib is built before aws-cdk-lib is built. However, this is pretty easy to do during code generation and in fact results in less duplication of logic.
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.
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
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.
Got my answer about runBuild in slack: we are going to handle that separately
@@ -72,7 +72,7 @@ export async function main() { | |||
const templateDir = path.join(__dirname, '..', 'lib', 'template'); | |||
await copyTemplateFiles(templateDir, targetDir); | |||
|
|||
await runBuild(targetDir); | |||
await cleanup(targetDir); |
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.
We want to keep runBuild as well, right?
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 want to handle it in a separate task it just complicates things currently
Adds functionality to cfn2ts and aws-cdk-lib gen.ts to correctly generate the map of cloudformation resource type names, to classes within aws-cdk-lib. this was previously handled by a build script in @aws-cdk/aws-cloudformation-include, but that depended on all of the individual @aws-cdk/ packages being built and parsing the code using the JSII assembly and jsii-reflect. This is not possible anymore because we can't assure aws-cdk-lib is built before aws-cdk-lib is built.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license