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: support all jsii programming languages #35

Merged
merged 12 commits into from
Oct 4, 2021
Merged

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Sep 30, 2021

Adds a required --language switch to cdk-import which allows specifying the target programming language
to generate code in. This uses jsii-srcmak (similar to CDKtf and CDK8s) to generate files that can be
included in projects.

Resolves #34

BREAKING CHANGE: a --language switch is now required and can have one of these values: typescript, java, csharp, python or golang.

Adds a required `--language` switch to cdk-import which allows specifying the target programming language
to generate code in. This uses jsii-srcmak (similar to CDKtf and CDK8s) to generate files that can be
included in projects.

Resolves #34

BREAKING CHANGE: cdk-import now requires --language to be specified.
@eladb
Copy link
Contributor Author

eladb commented Sep 30, 2021

@hoegertn would love your review on this PR.

@eladb eladb marked this pull request as draft September 30, 2021 19:20
src/cli.ts Outdated Show resolved Hide resolved
src/cli.ts Outdated Show resolved Hide resolved
src/cli.ts Outdated Show resolved Hide resolved
src/languages.ts Outdated Show resolved Hide resolved
src/languages.ts Outdated Show resolved Hide resolved
test/languages.test.ts Outdated Show resolved Hide resolved
test/fixtures/awsqs-eks-cluster/index.ts Show resolved Hide resolved
@hoegertn
Copy link
Contributor

@hoegertn would love your review on this PR.

@eladb I think it is a helpful addition. I would love if language is optional and defaults to TS as this might be the default use case when creating constructs.

@eladb
Copy link
Contributor Author

eladb commented Oct 3, 2021

I would love if language is optional and defaults to TS

Not sure I love the idea of defaulting to TypeScript. As a standalone tool, cdk-import will likely be used in CDK apps, and not in construct libraries and I don't think TypeScript it necessarily a reasonable default. Maybe in the future, we can include the language specification in cdk.json and read this value to auto detect the default but for now, I think we should keep this explicit.

@eladb eladb marked this pull request as ready for review October 3, 2021 12:43
@eladb eladb requested a review from Chriscbr October 3, 2021 12:43
@eladb
Copy link
Contributor Author

eladb commented Oct 3, 2021

@hoegertn @Chriscbr ready for another round.

@eladb
Copy link
Contributor Author

eladb commented Oct 4, 2021

@Chriscbr can you take another look?

@mergify mergify bot merged commit 41928c7 into main Oct 4, 2021
@mergify mergify bot deleted the benisrae/languages branch October 4, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple programming languages
3 participants