Sync plugins for the Goa v3.31.0 generation upgrade - #271
Merged
Merged
Conversation
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.
The official plugins now participate in the complete generation plan being promoted in goadesign/goa#3971. Plugins that add Go declarations record them before Goa fixes package names and imports; rendering uses those recorded declarations. This prevents plugin output from choosing names independently of the services and transports in the same package.
The types, goakit, i18n, mains, and testing generators use the planned services, declarations, imports, and transport helpers. The types plugin no longer adds a fake service while borrowing Goa templates. Generated test clients and scenarios follow the new HTTP/gRPC/JSON-RPC contracts, including supported JSON-RPC server streams. The Zap logger plugin updates the starter constructor and its callers together. Existing registration functions remain available for plugins that only edit files or values.
All four modules—the root and three testing examples—pin the reviewed Goa candidate. The examples have been regenerated, and the latest stable dependency changes are included. The Makefile installs the Goa command selected by
go.mod, so generation and compilation use the same version. This preparesv3for the coordinated v3.31.0 release; the release workflow will replace all candidate pins with the stable tag.Upgrade Goa and plugins together, then regenerate the complete application. These plugins retain the existing Go 1.26 requirement. Custom declaration-producing plugins must adopt the planning lifecycle. Direct callers of changed generator APIs and handwritten transport or command code must follow the Goa upgrade guide and its detailed API migration table. Generated client/server exchanges have the same coordinated-deployment requirements as Goa. Rollback restores both dependency versions, generated files, and handwritten callers together; the plugins introduce no persisted-data migration.
Validation: full
makepasses against Goa commitf03a5d261cc4f010b02595febcb7eb4c33fbbeb3, covering generation, static analysis, plugin tests, generated example packages, and all three testing-example modules. Regression tests cover validator-name collisions, unchanged evaluated services, planned test declarations, and the Zap constructor/caller contract. CI must pass before merge.Review the planning code in
types,goakit, andtesting/codegen/package_plan.go, the mains and i18n template changes, and the regenerated examples. Generated files were produced by Goa rather than edited by hand.