plugins: support "go generate" in go parts
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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 issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #293 plugins: add 'go-generate' GoPlugin option | craft-parts | merged | Merged an update adding an explicit go-generate plugin option to let users specify custom code generation commands instead of always running go generate ./... . Approved by one reviewer, changed 3 files, and resolves CRAFT-1406. | |
| #78 plugins: add go plugin (CRAFT-48) | craft-parts | merged | Merged a Go plugin for go.mod-based projects, adapted from Snapcraft V2. Approved by two reviewers, passed CI, and introduced 425 additions across seven files. Co-authored by Sergio Schvezov. | |
| #3046 plugins: introduce v2.GoPlugin | snapcraft | merged | Merged after approval and CI checks. Introduces v2.GoPlugin for Go plugin support requiring go.mod and adds .get_build_snaps as an abstract method to PluginV2. Changes span 26 files with 366 additions and 49 deletions. | |
| #709 Improve the go plugins usability | snapcraft | merged | Merged to improve Go plugin usability by combining source keywords with go-packages, enabling selective main package builds and remote fallback. Reviewer feedback on tests and build tags was incorporated before approval. The update modifies seven files. | |
| #1338 go plugin: Add support for cross-compilation | snapcraft | merged | Merged after approval, enabling cross-compilation for the Go plugin via snapcraft's --target-arch flag. Six files were modified with 144 additions and 11 deletions. | |
| #997 plugins: update go plugin to use get_build_properties() | snapcraft | merged | Merged after approval and passing CI. Updates the Go plugin to use get_build_properties(), adjusts the schema test, and adds unit tests for get_pull_properties() and get_build_properties(). Changes successfully integrated. |