Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theGenerate*
family of language host gRPC methods. Recently, these gRPC methods were implemented, to support (among other things) conformance testing. Unfortunately, while both routes end inpkg/codegen/java
'sGenerate*
functions, each had accumulated its own special "setup logic" ahead of the call intopkg/codegen
. This commit attempts to sort this out, pushing all that logic intopkg/codegen
so that both routes behave identically. As a result of this, we should be able to deprecatepulumi-java-gen
more safely when the time comes, remove direct build-time dependencies onpulumi-java
frompulumi/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 modifiedpulumi package gen-sdk
that can be mainstreamed when these changes have been merged and released).Closes #1404
Part of #1508