← Back to issue list

plugins: add go plugin (CRAFT-48)

View original Github issue

Metadata

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

Current evaluation

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.

Resolution: closed resolved

Reason: PR #78 was approved by two reviewers and merged by cmatsuoka, landing as merge commit b5b779df with squashed commit fa3fe8c8 'plugins: add go plugin'. The GoPlugin class now lives in craft_parts/plugins/go_plugin.py, confirming the feature shipped.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Add a plugin for go projects using go.mod. Plugin build definitions are based on the Snapcraft V2 go plugin. Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com> Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Merged canonical/craft-parts#78, adding a Go plugin for go.mod-based projects, adapted from Snapcraft V2.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged a Go plugin for go.mod-based projects, adapted from Snapcraft V2. Co-authored by Sergio Schvezov and authored by Claudio Matsuoka. Temporarily set to draft for environment validation testing before final merge.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#313 (confidence 72%)

    Later fix 'plugins: fix go plugin for 22.04 and enable ci runners' addressing Go version/GOPATH handling in the plugin added here.

  • Related To: canonical/craft-parts#694 (confidence 70%)

    Later commit e017c4be 'docs: add docs for go plugin', documenting the plugin introduced by this PR.

Related issues

Issue Project State Summary Similarity
#694 docs: add docs for 'go' plugin craft-parts merged Merged #694, adding 97 lines of Go plugin reference documentation and a build-time example applicable to Snapcraft and Rockcraft; documented in craft-parts 1.31.0.
78%
#271 plugins: support "go generate" in go parts craft-parts merged Merged in commit 3e4a04fe: GoPlugin now runs go generate before builds, enabling code generation; released in craft-parts 1.13.0.
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.
76%
#3046 plugins: introduce v2.GoPlugin snapcraft merged Merged as 7e14dd039, adding v2.GoPlugin for go.mod-based projects and making get_build_snaps an abstract PluginV2 method.
76%
#99 go plugin: implement a go-packages plugin property snapcraft merged Merged PR #99 added the go-packages property to Snapcraft's Go plugin in commit 657db2cf1, merged via 9d3d05044.
74%