go plugin doesn't honor godeps file

Bug #1748202 reported by Laurent Sesquès
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Invalid
Undecided
Unassigned

Bug Description

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

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

We have a `godeps` plugin just for this. If this is not the `godeps` incantation you are looking for, given there are many implementations and exploratory tools that led to vendoring in go today I suggest you open a new Wishlist bug with a link to the specific godep tool.

Changed in snapcraft:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.