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

Centralize SDK generation logic #1515

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Centralize SDK generation logic #1515

merged 1 commit into from
Dec 20, 2024

Conversation

lunaris
Copy link
Contributor

@lunaris lunaris commented Dec 19, 2024

Presently, the majority of Java code generation is driven by the pulumi-java-gen binary, since Java usage began before we had time to implement the Generate* family of language host gRPC methods. Recently, these gRPC methods were implemented, to support (among other things) conformance testing. Unfortunately, while both routes end in pkg/codegen/java's Generate* functions, each had accumulated its own special "setup logic" ahead of the call into pkg/codegen. This commit attempts to sort this out, pushing all that logic into pkg/codegen so that both routes behave identically. As a result of this, we should be able to deprecate pulumi-java-gen more safely when the time comes, remove direct build-time dependencies on pulumi-java from pulumi/pulumi and fix some issues that have arisen as a result of the historic differences, such as #1404 (which looks like it may have already been fixed, but this should cement it), and the Java side of #1508.

Alongside new unit tests and existing conformance tests, this changeset has been manually tested using pulumi-azure-native and changes akin to those in pulumi/pulumi-azure-native#3776 (using a locally modified pulumi package gen-sdk that can be mainstreamed when these changes have been merged and released).

Closes #1404
Part of #1508

@lunaris lunaris added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Dec 19, 2024
@lunaris lunaris requested a review from a team as a code owner December 19, 2024 15:17
@lunaris lunaris force-pushed the wjones/gen-pkg-info branch 5 times, most recently from 60713ce to d1aed25 Compare December 20, 2024 12:29
Presently, the majority of Java code generation is driven by the
`pulumi-java-gen` binary, since Java usage began before we had time to implement
the `Generate*` family of language host gRPC methods. Recently, these gRPC
methods were implemented, to support (among other things) conformance testing.
Unfortunately, while both routes end in `pkg/codegen/java`'s `Generate*`
functions, each had accumulated its own special "setup logic" ahead of the call
into `pkg/codegen`. This commit attempts to sort this out, pushing all that
logic into `pkg/codegen` so that both routes behave identically. As a result of
this, we should be able to deprecate `pulumi-java-gen` more safely when the time
comes, remove direct build-time dependencies on `pulumi-java` from
`pulumi/pulumi` and fix some issues that have arisen as a result of the historic
differences, such as #1404 (which looks like it may have already been fixed, but
this should cement it), and #1508

Closes #1404
Fixes #1508
@lunaris lunaris force-pushed the wjones/gen-pkg-info branch from d1aed25 to 123d176 Compare December 20, 2024 13:00
@lunaris lunaris merged commit d2a85f0 into main Dec 20, 2024
23 checks passed
@lunaris lunaris deleted the wjones/gen-pkg-info branch December 20, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pulumi-java-gen fills in default dependency versions that pulumi gen-sdk doesn't
2 participants