← Back to issue list

Cannot easily skip `go mod download` with the `go` plugin

View original Github issue

Metadata

Project
rockcraft
Number
#510
Type
issue
State
open
Author
alnvdl-work
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request: the `go` plugin (craft-parts go_plugin.py) unconditionally runs `go mod download all`, with no key to skip it for vendored deps; overriding the whole build script is the only workaround. Unlabelled, no maintainer reply.

Suggested action: needs triage

Reason: The only comment is an automated Jira sync ('The internal ticket has been created: ... CRAFT-2621'); there are no labels, no assignee, and no maintainer response, so the request has never been triaged. Verified at the pinned craft-parts HEAD that `craft_parts/plugins/go_plugin.py` still emits `setup_cmds = ["go mod download all"]` unconditionally (except when a go-use backstage workspace exists) and exposes only `go-buildtags`/`go-generate`, so the limitation is real and unresolved; the closest precedent is the ruby plugin's vendor/cache handling. Impact is moderate because a working workaround (`override-build`) exists, and the actual change belongs in craft-parts rather than rockcraft (the reporter's snapcraft pointer is to the legacy plugin), so the cross-repo scope and lack of a proposed key name/design keep this from being turnkey.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 13 Complexity: 35 Confidence: 80 Actionability: 65

Issue body

### What needs to get done When building with the `go` plugin, it's currently impossible to skip `go mod download` without overriding the entire build script as follows: ``` parts: mypart: plugin: go source-type: local source: . override-build: | go install ./... ``` ### Why it needs to get done Skipping `go mod download` can be useful in cases where private dependencies were vendored before being passed to `rockcraft`. I believe in reality this is related to `snapcraft`, but I'm reporting it here anyway, please move the issue if needed. See the `go` plugin at: https://github.com/canonical/snapcraft/blob/main/snapcraft_legacy/plugins/v2/go.py

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 13
Complexity: 35
Confidence: 80
Actionability: 65
needs triage Feature request: the `go` plugin (craft-parts go_plugin.py) unconditionally runs `go mod download all`, with no key to skip it for vendored deps; overriding the whole build script is the only workaround. Unlabelled, no maintainer reply.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 70
Actionability: 80
needs triage Feature request to add a property to skip 'go mod download' in the go plugin for vendored dependencies. Open, unlabelled, no maintainer response.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 20
Staleness: 70
Complexity: 35
Confidence: 75
Support Request: 25
needs triage Feature request to add an option to skip 'go mod download' in the go plugin for vendored private dependencies. 899 days old, only a bot JIRA-sync comment, no maintainer triage. The hardcoded 'go mod download all' step still exists in craft-parts go_plugin.py.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 75
Support Request: 10
needs triage Feature request to add a configuration option to skip go mod download in the go plugin, enabling use of vendored dependencies. Currently unlabelled and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 75
Support Request: 10
needs triage Feature request to add a configuration option to skip go mod download in the go plugin for vendored dependencies. Untriaged and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 75
Support Request: 10
needs triage Feature request to add a flag to skip go mod download in the go plugin, currently requiring full build script overrides. Untriaged and inactive for over a year.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.