← Back to issue list

Add ldflags to the go plugin

View original Github issue

Metadata

Project
craft-parts
Number
#1416
Type
issue
State
open
Author
lengau
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request to add a `go-ldflags` option to the Go plugin for passing linker flags to `go install`. A contributor prepared a local patch but stepped back; issue remains open and available.

Suggested action: keep open

Reason: This is a valid, well-scoped feature request from a maintainer (lengau) to add a `go-ldflags` string property to the Go plugin. A contributor (gcomneno) prepared a local implementation but stepped back in October 2026, leaving the issue open and available. The spec is clear: add a property, pass it via `-ldflags` to `go install`, with shell quoting via `shlex.quote()`. No PR has been submitted yet, so it needs someone to pick it up.

Evaluated by: mr-cal-bot

Impact: 65 Quick Win: 36 Complexity: 30 Confidence: 75 Actionability: 80

Issue body

### What needs to get done The plugin should be able to provide ldflags when installing a go app ### Why it needs to get done This is useful for being able to override certain variables, just like in goreleaser.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 65
Quick Win: 36
Complexity: 30
Confidence: 75
Actionability: 80
keep open Feature request to add a `go-ldflags` option to the Go plugin for passing linker flags to `go install`. A contributor prepared a local patch but stepped back; issue remains open and available.
stealth/space-bunny-alpha
Impact: 38
Quick Win: 27
Complexity: 15
Confidence: 88
Actionability: 85
keep open Maintainer-authored feature request to add a `go-ldflags` key so the Go plugin can pass linker flags to `go install` (like goreleaser). Still unimplemented on main; a contributor volunteered and has a local patch but no PR yet.
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 21
Complexity: 25
Confidence: 80
Actionability: 80
keep open Feature request to add a go-ldflags option to the Go plugin for passing linker flags to go install. A contributor has volunteered and prepared a local implementation.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22
Staleness: 5
Complexity: 25
Confidence: 85
Support Request: 0
keep open Feature request to add an ldflags option to the Go plugin so users can pass linker flags (e.g. version overrides) to go install, similar to goreleaser. Not yet implemented; a contributor volunteered with a concrete plan 17 days ago.
qwen/qwen3.6-35b-a3b
Staleness: 20
Complexity: 25
Confidence: 85
Support Request: 5
needs triage Feature request to add ldflags support to the Go plugin for overriding variables during installation. Open, unlabelled, with a contributor recently volunteering to implement it.
qwen/qwen3.6-35b-a3b
Staleness: 70
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Feature request to allow the go plugin to pass ldflags during Go app installation, similar to goreleaser. Currently unlabelled, unassigned, and inactive for 221 days with no maintainer discussion.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 20
Confidence: 85
Support Request: 0
needs triage Feature request to allow passing ldflags to the go plugin during app installation, similar to goreleaser. Currently unlabelled, inactive for 208 days, and awaiting maintainer triage.

Update history

Date Change
updated
updated
updated

Related work

  • Related To: snapcraft#92 (confidence 70%)

    snapcraft#92 merged a PR to export CGO_LDFLAGS from the staged root for Go builds — a related but distinct concern (environment variable propagation vs explicit linker flag injection).

Related issues

No related issues found above the similarity threshold.