Repository navigation
Add Java generation for native Nexus APIs - #245
Draft
tconley1428 wants to merge 15 commits into
Draft
tconley1428 wants to merge 15 commits into
tconley1428 wants to merge 15 commits into
Conversation
tconley1428
force-pushed
the
java-signal-with-start
branch
from
October 20, 2026 16:02
84f3d95 to
24428c3
Compare
…sion" This reverts commit 435287f.
tconley1428
force-pushed
the
java-signal-with-start
branch
from
October 22, 2026 17:11
c955956 to
0fb0f6a
Compare
tconley1428
force-pushed
the
java-signal-with-start
branch
from
October 22, 2026 17:30
0fb0f6a to
3b7e603
Compare
tconley1428
force-pushed
the
java-signal-with-start
branch
from
October 26, 2026 19:50
3b7e603 to
00090da
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Java generation handles native Nexus declarations and protobuf transfer types, enabling workflow-side signal-with-start in the Java SDK. It emits models, builders, operations, resources, variants, generics, outbound interceptor hooks, serialization-context factories, and an operation-root manifest for SDK payload visitor generation. An inheritable operations class exposes generated APIs without handwritten facade methods. Java formatting landed separately in #246.
Operation parameters contain only function references/names and their inputs. All other fields, including required fields, belong to a mandatory generated options object. Typed overloads support primary callable arities zero through six and other callable arities zero or one, preserving argument and result types for value-returning and void methods. Name-based calls accept an Object[] after each callable name. Shared private invocation/request helpers avoid duplicating validation, extraction, and merging across overloads.
Java-only
@nexus.merge-from-function function="workflow" java="..."annotations select helpers that merge callable metadata with explicit options. Existing parser/model mappings retain the helper reference and metadata type without a new compiler pass. Required fields with merge hooks may be omitted from Java options and are validated after resolution at invocation; wire-model requiredness is unchanged. Other languages ignore these Java hooks.The shared workflow-service WIT uses these hooks for workflow ID and retry/cron annotations. Typed calls derive ID from the workflow reference, reject conflicting explicit IDs and run-pinned references, and ignore the signal reference's execution identity. Untyped calls require an explicit ID. Task queue remains required. Helpers own these policies; generation has no workflow/start/signal-specific branches or synthesized WorkflowOptions.
Protobuf conversion uses the existing descriptor index and SDK-owned converter scope for embedded user values. Required payload fields serialize null values; optional null fields remain absent. Conversion helpers reuse SDK utilities where available. The sample support helper contains its own implementation, matching the package-private SDK helper rather than delegating to it. Runtime helpers are emitted Rust strings. JSON Schema orchestration remains in its Java submodule. Shared WIT and temporary SDK copies are byte-identical.
Signal-with-start serializes its request and receives a payload-free response. Future payload responses need generic models and concrete result types. The known packing-codec limitation in request-model deserialization remains outside this call path.
Validation for the latest changes: nine generator tests, Java samples including 51 compiler cases, 18 focused companion SDK tests, and two real-server signing-codec/replay tests passed. Compiler cases cover arity/type/result errors, nested generics, void methods, mandatory options, and untyped fallback. Full cross-language validation passed on earlier revisions; it was not rerun for these latest changes, per the requested iteration scope.
Companion SDK draft: temporalio/sdk-java#3154. Java samples use TEMPORAL_JAVA_SDK_DIR for unreleased SDK integration.