Skip to content

chore(individual-pkg-gen): remove L1s from alpha modules#16481

Merged
mergify[bot] merged 37 commits intoaws:masterfrom
madeline-k:v2/remove-l1s-and-rewrite-imports-1
Sep 25, 2021
Merged

chore(individual-pkg-gen): remove L1s from alpha modules#16481
mergify[bot] merged 37 commits intoaws:masterfrom
madeline-k:v2/remove-l1s-and-rewrite-imports-1

Conversation

@madeline-k
Copy link
Copy Markdown
Contributor

The PR contains the following changes:

  1. Skip copying the generated L1 files into the alpha modules
  2. Re-write imports in the alpha modules that reference L1s to reference aws-cdk-lib/aws-
    These imports come in the following formats: ./<service>.generated, ../<service>.generated, ../lib/<service>.generated. All of these formats get converted to aws-cdk-lib/aws-
  3. Don't export generated L1s in the index.ts files of the alpha modules.

Closes #15587


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

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Sep 14, 2021

@madeline-k
Copy link
Copy Markdown
Contributor Author

See #16354 for previous discussion/context.

madeline-k and others added 3 commits September 14, 2021 14:08
…nstructs from other alpha modules. Cfn imports need to come from aws-cdk-lib, while L2 construct imports need to come from the alpha modules.
@madeline-k madeline-k requested review from a team and nija-at September 14, 2021 22:59
@madeline-k madeline-k requested review from a team and njlynch September 22, 2021 19:33
return newPath;
}

async function lintAndGetErrorCountAndMessage(file: string) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very long name. Why not just lint()?

@@ -0,0 +1 @@
To allow rewriting imports when generating v2 experimental packages, `CfnDeliveryStream` must be imported by name and separate from non-L1 imports, since it is being imported from an experimental package: @aws-cdk/aws-kinesisfirehose No newline at end of file
Copy link
Copy Markdown
Contributor

@nija-at nija-at Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why support only one error message in an .error.txt file? We should support writing tests that produce multiple error messages.

And it should be order insensitive.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented this to be one line per error message in the error.txt file, let me know if you have thoughts to make that format better! csv, maybe?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about one error message per line?

@madeline-k madeline-k requested review from a team and nija-at September 23, 2021 17:24
Copy link
Copy Markdown
Contributor

@njlynch njlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Nice job slogging through this; it ended up being more complex than we original guestimated! :)

@madeline-k madeline-k removed the pr/do-not-merge This PR should not be merged at this time. label Sep 24, 2021
@madeline-k madeline-k dismissed nija-at’s stale review September 25, 2021 18:26

requested changes have been addressed.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 78a7aba
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 851c8ca into aws:master Sep 25, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 25, 2021

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

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
The PR contains the following changes:

1. Skip copying the generated L1 files into the alpha modules
2. Re-write imports in the alpha modules that reference L1s to reference aws-cdk-lib/aws-
    These imports come in the following formats: `./<service>.generated`, `../<service>.generated`, `../lib/<service>.generated`. All of these formats get converted to aws-cdk-lib/aws-<service>
3. Don't export generated L1s in the index.ts files of the alpha modules.

Closes aws#15587

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the L1s from unstable modules in V2

4 participants