← 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 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.

Suggested action:

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
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 issues

Issue Project State Summary Similarity
#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.
84%
#1802256 go plugin: support Go modules snapcraft (launchpad) open Feature request for first-class Go modules support in the Go plugin. Now implemented: craft-parts' go plugin is go.mod-based (craft-parts#78), and snapcraft#3133 added go.mod support to the old v1 plugin. No activity for ~8 years.
80%
#694 docs: add docs for 'go' plugin craft-parts merged Merged documentation for the 'go' plugin, featuring a build-time example for Snapcraft and Rockcraft. Approved by two reviewers, the update adds 97 lines across two files.
78%
#271 plugins: support "go generate" in go parts craft-parts merged 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.
76%
#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.
75%
#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.
75%
#2194 plugins: do not install go debs if go snap is used snapcraft merged Merged a fix to the go plugin that skips installing the golang-go deb package when a go build-snap is defined, resolving PATH conflicts. Approved by reviewers, passed CI with full coverage, and integrated into master.
72%
#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.
71%
#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.
71%
#2323 go plugin: support for bases snapcraft merged Merged. Introduces base support to the Go plugin, prioritizing the Go snap from the Snap Store and enabling golang-go installation on supported bases. Approved by reviewer and passed all CI checks.
70%