-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(cfn2ts, aws-cdk-lib): cfn2ts not compatible with aws-cdk-lib #18037
Labels
aws-cdk-lib
Related to the aws-cdk-lib package
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Comments
rix0rrr
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 15, 2021
njlynch
added
effort/medium
Medium work item – several days of effort
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 30, 2021
4 tasks
mergify bot
pushed a commit
that referenced
this issue
Apr 7, 2022
This PR moves `cfn-parse.ts` under a folder within `@aws-cdk/core/lib`, where it is "secretly" exported. You can access the API of `cfn-parse` by importing `import * as cfn_parse from '@aws-cdk/core/lib/cfn-parse';`. The motivation behind this change is to stabilize the code generated by `cfn2ts`. `cfn2ts` imports `cfn_parse` but until now, this was not possible in v2 since `aws-cdk-lib` is export-restricted. This change should allow cdk v2 users the ability to generate L1 code via `cfn2ts`. Closes #18037. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
StevePotter
pushed a commit
to StevePotter/aws-cdk
that referenced
this issue
Apr 27, 2022
This PR moves `cfn-parse.ts` under a folder within `@aws-cdk/core/lib`, where it is "secretly" exported. You can access the API of `cfn-parse` by importing `import * as cfn_parse from '@aws-cdk/core/lib/cfn-parse';`. The motivation behind this change is to stabilize the code generated by `cfn2ts`. `cfn2ts` imports `cfn_parse` but until now, this was not possible in v2 since `aws-cdk-lib` is export-restricted. This change should allow cdk v2 users the ability to generate L1 code via `cfn2ts`. Closes aws#18037. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *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
aws-cdk-lib
Related to the aws-cdk-lib package
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Description
Some teams (internal, probably also external) are using
cfn2ts
to generate L1 construct libraries from a spec.Unfortunately,
cfn2ts
generates dependencies on APIs that are not exported from the (now export-restricted)aws-cdk-lib
package, and so any L1 that's generated that is not itself bundled intoaws-cdk-lib
will not work anymore.This will hurt v2 adoption, and should be rectified by making the APIs that
cfn2ts
depends on public (or at least, importable as a TypeScript-only helper API, look at how CDK Pipelines did that).(Ask @rix0rrr for internal contacts)
Use Case
Generating L1s external to CDK
Proposed Solution
Stabilizing the contract
Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: