Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Go proto-backed operation models now use SDK transfer-type converters instead
of eager conversion at the operation call site. Conversion errors surface on
the returned future. Generated converters use
`converter.NewContextualTransferTypeConverter`. The Go samples pin the
squash-merged experimental SDK API from temporalio/sdk-go#2703.

### Deprecated

### Breaking Changes

- Go models with generated transfer-type converters require workflow context and
cannot be used as top-level workflow return values or activity arguments.
- Go generation rejects `@nexus.omit` fields used as resource constructor
arguments.
- .NET generic type parameters now use the C# `T` prefix. For example, the
authored `output-t` alias generates `TOutput` instead of `OutputT`.

Expand Down
14 changes: 14 additions & 0 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,20 @@ code that converts between the public model and its protobuf transfer type.
Generated callers continue to accept and return the public model; conversion is
performed by the target SDK or generated operation helpers.

For Go, generated proto-backed operation inputs and outputs implement
`converter.ValueWithTransferTypeConverter`. The SDK converts these models during
payload conversion using `converter.NewContextualTransferTypeConverter`; the generated
method returns both the converter and its construction error. Models and transfer
types use non-pointer type arguments, with a value receiver on the model.

Go conversion requires a `workflow.Context` to access the workflow's data
converter. Using these models outside a workflow, including as a workflow's
top-level return value or an activity argument, fails with `can only be converted
inside a workflow`. Override-converter types and resource-return or
output-transform results continue to use generated operation helpers instead of
model transfer-type converters. Nexus conversion errors surface on the returned
future. An `@nexus.omit` field cannot supply a Go resource constructor argument.

### Transfer-Type Conversion

```wit
Expand Down
2 changes: 1 addition & 1 deletion advanced/samples/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/nexus-rpc/sdk-go v0.7.0
github.com/stretchr/testify v1.10.0
go.temporal.io/api v1.63.5
go.temporal.io/sdk v1.48.1-0.20260828193328-cfdc74a4e624
go.temporal.io/sdk v1.49.1-0.20261006234944-b7c855cd3699
google.golang.org/protobuf v1.36.11
)

Expand Down
4 changes: 2 additions & 2 deletions advanced/samples/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.temporal.io/api v1.63.5 h1:c11+kPYHkXXL3UiShPdbMD+xtvqGsbTibUA9ypmiCa4=
go.temporal.io/api v1.63.5/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ=
go.temporal.io/sdk v1.48.1-0.20260828193328-cfdc74a4e624 h1:OOTiDG3gJhzPhqn1YebEGqU5ic1rH/Am5uvOmEk1jL4=
go.temporal.io/sdk v1.48.1-0.20260828193328-cfdc74a4e624/go.mod h1:tr/G47tBsjORurCbixYoMDy2Lqiks6lIKS5+kI9jd40=
go.temporal.io/sdk v1.49.1-0.20261006234944-b7c855cd3699 h1:H0lzIOKvMyITmdudf0Aon4wcMGbDBPQw3YyVsZABU2I=
go.temporal.io/sdk v1.49.1-0.20261006234944-b7c855cd3699/go.mod h1:xP0FulN5JJSfisESUP60LlWsrKz2tLSStGjVdk8r5cc=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
Expand Down
162 changes: 92 additions & 70 deletions advanced/samples/go/startworkflow/startworkflowservice.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading