← Back to issue list

go plugin doesn't honor godeps file

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1748202
Type
issue
State
closed
Author
~sajoupa
Labels
—
Created
Updated
Closed

Current evaluation

Closed after a maintainer explained that Snapcraft's dedicated godeps plugin must be used; the go plugin does not consume versions from a Godeps file.

Resolution: closed not a bug

Reason: In the 2018-02-08 closing response, ~sergiusens directed the reporter to the existing godeps plugin and advised opening a specific Wishlist item for another Godeps implementation. No change to the go plugin was required.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When trying to build a snap for telegraf (github.com/influxdata/telegraf), using the 'go' plugin, I got the following error: package github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore: cannot find package "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore" in any of: /usr/lib/go-1.8/src/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore (from $GOROOT) /home/sajoupa/go/src/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore (from $GOPATH) This is because telegraf uses a specific commit for this package, as specified in Godeps. And between this commit, and the most recent, this path was updated. But snapcraft uses 'go get [..]/telegraf/...', so, latest version of sub-packages. As far as I can see, snapcraft doesn't support specifying package versions in Godeps, but a lot of projects use it, so it would be pretty useful ? Thanks, Laurent snapcraft.yaml to reproduce: name: telegraf version: 1.5.2 summary: Telegraf agent description: | Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics confinement: classic grade: devel apps: telegraf: command: telegraf daemon: simple parts: telegraf: source: https://github.com/influxdb/telegraf.git go-importpath: github.com/influxdb/telegraf plugin: go

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed after a maintainer explained that Snapcraft's dedicated godeps plugin must be used; the go plugin does not consume versions from a Godeps file.
stealth/space-bunny-alpha — closed not a bug Closed after a maintainer directed users to Snapcraft's dedicated godeps plugin rather than the general go plugin.
stealth/space-bunny-alpha — closed stale Go plugin ignored Godeps-pinned revisions and fetched incompatible dependencies, breaking the Telegraf build. Closed without a documented fix or follow-up.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The go plugin never implemented Godeps support, and the issue was abandoned or superseded by Go modules.
qwen/qwen3.6-35b-a3b — — The go plugin fails to parse Godeps files for dependency versioning, causing build errors. The issue was closed without resolution, indicating it was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The issue was likely abandoned or superseded by Go modules, as the go plugin now relies on go.mod instead of Godeps. No comments or fixes were added.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The snapcraft go plugin ignores Godeps files for dependency version pinning, and no fix or implementation was provided.

Update history

Date Change
created

Related work

  • Related To: snapcraft#691 (confidence 95%)

    PR #691 added the dedicated godeps plugin recommended by the maintainer.

Related issues

Issue Project State Summary Similarity
#1595981 Need a godeps plugin snapcraft (launchpad) closed Godeps plugin support was merged in snapcore/snapcraft#691 via commit a073503c0.
79%
#691 Add godeps plugin. snapcraft merged Godeps plugin merged into snapcraft via commit a073503c0 (PR #691), adding Go godeps dependency support and resolving LP bug #1595981; later enhanced by follow-up PRs.
79%
#1922150 godeps using seemingly invalid commit hash snapcraft (launchpad) closed Fixed by merged snapcore/snapcraft#3475 (commit a6dfe1cd2), which defaulted the unmaintained godeps plugin to Go 1.15/stable; the reporter confirmed the workaround restored CI.
75%
#1884558 go plugin with snapcraft 4 doesn't support building static binaries snapcraft (launchpad) closed Closed as stale after more than six years; a maintainer noted that the Go plugin had changed substantially since Snapcraft 4, with no targeted fix cited.
73%
#1671546 godeps plugin does not installing the git package by itself snapcraft (launchpad) closed Fixed in snapcore/snapcraft#1179, merged as commit 10c46b8ad; the godeps plugin now adds git to build-packages.
73%
#1794784 Update the godeps plugin to be base aware snapcraft (launchpad) closed Godeps gained base support through snapcore/snapcraft PR #2328, implemented by commit e1393815d.
72%
#1657212 Godeps plugin support to build only needed binaries snapcraft (launchpad) closed Godeps gained go-packages support to build selected binaries via snapcore/snapcraft PR #1057, merged as commit 81f56fd13.
71%
#1751 the go plugin doesn't use go build-snaps snapcraft closed Fixed in canonical/snapcraft#2194 (commit 12d9151d3): the Go plugin now skips legacy golang-go DEBs when a Go build snap is configured.
71%
#1612741 Snapcraft go plugin install issues snapcraft (launchpad) open Go 1.6 godoc builds targeted read-only GOROOT; Go 1.7 fixed the special case, and Snapcraft now directs Go binaries into the part install directory.
71%
#2194 plugins: do not install go debs if go snap is used snapcraft merged Merged as commit 12d9151d3: the Go plugin now skips golang-go when a go build-snap is defined, preventing PATH conflicts.
70%