← Back to issue list

Allow customization/removal of automatic "go generate" step

View original Github issue

Metadata

Project
rockcraft
Number
#102
Type
issue
State
open
Author
tigarmo
Labels
—
Created
Updated
Closed
—

Current evaluation

Automatic Go generation is now opt-in: craft-parts added go-generate, which defaults to no generation, and Rockcraft exposes the option in its schema.

Suggested action: close resolved

Reason: craft-parts commit 2fa63f24 (craft-parts#293) added the go-generate option. The current plugin defaults it to an empty list and runs generation only for configured parameters; Rockcraft's schema also includes this property with an empty-list default.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 39 Complexity: 12 Confidence: 99 Actionability: 98

Issue body

The GoPlugin current always calls `go generate ./...` when building the go code. However, there have been two instances so far (chisel and pebble) where that call is incorrect - it generates code that then fails to compile. The workaround currently is to override the entire build step, so we should come up with a way to customize/toggle this.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 39
Complexity: 12
Confidence: 99
Actionability: 98
close resolved Automatic Go generation is now opt-in: craft-parts added go-generate, which defaults to no generation, and Rockcraft exposes the option in its schema.
stealth/space-bunny-alpha
Impact: 25
Quick Win: 23
Complexity: 5
Confidence: 93
Actionability: 95
close resolved GoPlugin used to always run `go generate ./...`, breaking chisel/pebble parts; resolved upstream in craft-parts by the optional `go-generate` key (empty by default). No maintainer confirmation after two triage comments.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 29
Complexity: 10
Confidence: 93
Actionability: 92
close resolved Request to make the GoPlugin's automatic `go generate ./...` step customizable/optional. Already delivered upstream: craft-parts added a `go-generate` list option (default empty, no generation), now exposed in rockcraft's bundled schema.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 90
Actionability: 80
close resolved Rockcraft's GoPlugin always ran `go generate ./...`, causing build failures. Fixed upstream in craft-parts by adding an optional `go-generate` parameter (default: empty, no generation).
qwen/qwen3.8-27b
Impact: 35
Quick Win: 30
Staleness: 55
Complexity: 15
Confidence: 85
Support Request: 5
close stale GoPlugin always ran 'go generate ./...' causing build failures for chisel/pebble. Fixed upstream in craft-parts 1.15.0 (2022) via go-generate option (default empty). Maintainer assessed as resolved; awaiting reporter confirmation. Rockcraft requires craft-parts>=2.35.0.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 20
Confidence: 85
Support Request: 10
close not a bug Request to customize or disable automatic go generate step in GoPlugin. Maintainer notes upstream craft-parts fix removed default behavior, requests confirmation to close as resolved.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 15
Confidence: 95
Support Request: 0
close stale Request to customize or disable automatic go generate in GoPlugin. Upstream craft-parts now defaults to not running it, exposing a go-generate parameter instead. Awaiting author confirmation to close as resolved.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-parts#293 (confidence 99%)

    Commit 2fa63f24 made go generate configurable and opt-in, directly resolving the reported behavior.

Related issues

No related issues found above the similarity threshold.