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

Suggested action: keep open

Reason: Filed by a maintainer and actively engaged: gcomneno commented 17 days ago offering to implement a `go-ldflags` option passed to the final `go install` invocation, with a plan covering quoting semantics, unit tests, and docs. Code inspection confirms the option does not exist yet (only go-buildtags/go-generate), so the request is still valid and in progress.

Impact: 30 Quick Win: 22.5 Staleness: 5 Complexity: 25 Confidence: 85 Support Request: 0

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.8-27b
Impact: 30
Quick Win: 22.5
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 60
Complexity: 30
Confidence: 85
Support Request: 10
needs triage Request to add ldflags support to the Go plugin, enabling variable overrides during app installation similar to goreleaser. Open for 188 days with zero comments. Requires triage and assignment to move forward.

Update history

Date Change
updated

Related work

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

    Also about linker flags in the go plugin, but for CGO_LDFLAGS (cgo linking of staged libraries) rather than a -ldflags build option; different mechanism.

Related issues

No related issues found above the similarity threshold.