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

Implement GenerateProgram and GenerateProject #1469

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

lunaris
Copy link
Contributor

@lunaris lunaris commented Nov 18, 2024

The GenerateProgram and GenerateProject methods of the LanguageRuntime gRPC service allow callers to generate programs (in this case, Java source code) and projects (programs complete with e.g. build and packaging components -- in this case, Maven pom.xmls and so on). This commit implements these endpoints for pulumi-language-java, using the functionality that already exists but previously was only exposed through the pulumi-java-gen binary. Doing so means we can begin to get conformance tests (which generate programs using RPC calls) working for Java.

Note that as part of this, we add support for local (packed) dependencies to GenerateProject, which is key to enabling conformance tests also. We do this by harnessing Maven's existing <repositories> tag, which allows specifying paths to non-default Maven repositories where it can find .jars etc. This will tie in with our later implementation of Pack, which will produce local Maven repositories containing built .jars.

@lunaris lunaris requested a review from a team as a code owner November 18, 2024 12:51
@lunaris lunaris force-pushed the wjones/gen-prog-proj branch from f824ff9 to 97337d4 Compare November 18, 2024 12:56
The `GenerateProgram` and `GenerateProject` methods of the `LanguageRuntime`
gRPC service allow callers to generate programs (in this case, Java source code)
and projects (programs complete with e.g. build and packaging components -- in
this case, Maven `pom.xml`s and so on). This commit implements these endpoints
for `pulumi-language-java`, using the functionality that already exists but
previously was only exposed through the `pulumi-java-gen` binary. Doing so means
we can begin to get conformance tests (which generate programs using RPC calls)
working for Java.

Note that as part of this, we add support for local (packed) dependencies to
`GenerateProject`, which is key to enabling conformance tests also. We do this
by harnessing Maven's existing `<repositories>` tag, which allows specifying
paths to non-default Maven repositories where it can find `.jar`s etc. This will
tie in with our later implementation of `Pack`, which will produce local Maven
repositories containing built `.jar`s.
@lunaris lunaris force-pushed the wjones/gen-prog-proj branch from 97337d4 to 24e37bd Compare November 18, 2024 13:11
@lunaris lunaris merged commit 32c6b70 into main Nov 18, 2024
23 checks passed
@lunaris lunaris deleted the wjones/gen-prog-proj branch November 18, 2024 13:20
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.

2 participants