Skip to content
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

Conversation

MrArnoldPalmer
Copy link
Contributor

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

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.
@aws-cdk-automation aws-cdk-automation requested a review from a team February 28, 2023 18:42
@github-actions github-actions bot added the p2 label Feb 28, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 28, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Features must contain a change to a README file.
❌ Features must contain a change to a test file.
❌ Features must contain a change to an integration test file and the resulting snapshot.

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 Exemption Request and/or Clarification Request.

Copy link
Contributor

@madeline-k madeline-k left a 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);
Copy link
Contributor

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?

Copy link
Contributor Author

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

@MrArnoldPalmer MrArnoldPalmer merged commit dbbcb90 into aws:feat/repo-restructure Feb 28, 2023
@MrArnoldPalmer MrArnoldPalmer deleted the feat/cfn2ts-cfn-include-map branch April 26, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

3 participants