Skip to content

Goa v3.31.0-preview.1

Pre-release
Pre-release

Choose a tag to compare

@raphael raphael released this 27 Aug 00:43
· 1 commit to v3 since this release
26fd7ec

This is an opt-in preview of a large correction to Goa code generation. We are publishing it now so application and plugin authors can test real projects before the work becomes a stable release.

The generator now decides every package, file, name, import, validation function, conversion, and helper once for the complete generation run. Service, HTTP, gRPC, JSON-RPC, CLI, OpenAPI, example, and plugin output all use those same decisions. This fixes cases where Goa could declare a function under one name and call another, and it makes repeated generation produce the same complete result.

The preview also tightens contracts that the old generator represented incorrectly:

  • Required gRPC primitive fields now preserve whether a value was supplied, including explicit zero values.
  • Required OneOf unions require exactly one non-nil branch.
  • ArrayOfRequired rejects null primitive items without changing service-layer slice types.
  • Selected gRPC views use matching conversion and validation code.
  • JSON-RPC request, notification, batch, error, and server-sent-event behavior now follows its declared contract.
  • HTTP validation, multipart handling, server-sent events, WebSocket closing, query maps, and response errors are more exact.
  • Existing plugin entry points and common generated names remain available. Plugins that add package declarations or choose generated names must move that work into the planning API.

There are intentional source changes. Regenerate the complete gen directory, compile the application, and read the migration guide before deploying:

https://github.com/goadesign/goa/blob/v3.31.0-preview.1/UPGRADING.md

Install the preview explicitly:

go get goa.design/goa/v3@v3.31.0-preview.1
go install goa.design/goa/v3/cmd/goa@v3.31.0-preview.1

This tag does not replace the stable release and is not selected by @latest. The final stable version is still undecided.

Please report preview-wide feedback on PR #3971. Open a separate issue for a small reproducible bug. Include the design, generation command, generated diff, complete error, transport, and plugin details when applicable.

This preview also includes PR #3972, which fixes protobuf oneof field names and reservations.