← Back to issue list

plugins: support "go generate" in go parts

View original Github issue

Metadata

Project
craft-parts
Number
#271
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged in commit 3e4a04fe: GoPlugin now runs go generate before builds, enabling code generation; released in craft-parts 1.13.0.

Resolution: closed resolved

Reason: PR #271 was merged as commit 3e4a04fe, and the changelog records go generate support in release 1.13.0. Later, PR #293 made generation configurable through the go-generate option.

Evaluated by: mr-cal-bot

No scores available.

Issue body

plugins: support "go generate" in go parts GoPlugin's build step will now call "go generate" before the actual build/install to support code generation. This shouldn't affect existing uses of the plugin because the call is harmless if there's no code to generate. - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- CRAFT-1316

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in commit 3e4a04fe: GoPlugin now runs go generate before builds, enabling code generation; released in craft-parts 1.13.0.
stealth/space-bunny-alpha — closed resolved Merged PR #271 added go generate before GoPlugin builds, enabling code generation while remaining harmless when no generators are defined (CRAFT-1316).
qwen/qwen3.6-35b-a3b — — Merged. Integrates go generate into the GoPlugin build step to execute code generation prior to compilation. Approved by a reviewer, passed CI checks, and modified five files. The change is backward compatible and resolves CRAFT-1316.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Integrates go generate into the GoPlugin build step to enable pre-compilation code generation. The addition is backward compatible and safely skipped when no generators are present. Resolves CRAFT-1316.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#293 (confidence 100%)

    Added opt-in go-generate parameters instead of always invoking go generate.

Related issues

Issue Project State Summary Similarity
#293 plugins: add 'go-generate' GoPlugin option craft-parts merged Merged PR #293 in commit 2fa63f24, adding an opt-in go-generate list so GoPlugin no longer always runs go generate ./...
81%
#78 plugins: add go plugin (CRAFT-48) craft-parts merged Merged into main as commit b5b779df (squash fa3fe8c8), adding craft_parts/plugins/go_plugin.py with GoPlugin, GoPluginProperties and GoPluginEnvironmentValidator, adapted from Snapcraft's V2 go plugin.
77%
#1802256 go plugin: support Go modules snapcraft (launchpad) closed Closed as done: Go module support landed in the successor craft-parts Go plugin (merged PR canonical/craft-parts#78, commit b5b779df), which builds from go.mod; maintainer mr-cal cited it when closing.
74%