the go plugin doesn't use go build-snaps

Bug #1616985 reported by Leo Arias
72
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Michael Vogt

Bug Description

We are currently using the golang-go package from the xenial or yakkety, which is currently 1.6.

Go 1.7 was released some days ago, and there are already projects using it that won't be able to be snapped.

Update: we added build-snaps to snapcraft, and now there is a go snap with the latest versions. The go plugin should be able to use the go build-snap instead of the go deb.

Tags: plugin isv
Leo Arias (elopio)
tags: added: plugin
Leo Arias (elopio)
Changed in snapcraft:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
deadprogram (ron-s) wrote :

This is a big problem for many Golang projects that use features only available in golang 1.7+ such as 'Context' as they cannot be built under earlier versions.

Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Leo Arias (elopio) wrote :

This is now also needed by the ipfs snap: https://github.com/elopio/ipfs-snap
And consequently, by the openbazaar snap: https://github.com/OpenBazaar/openbazaar-go/blob/master/snapcraft.yaml

Leo Arias (elopio)
Changed in snapcraft:
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.27
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

This is also needed by the teleconsole snap.

Revision history for this message
Leo Arias (elopio) wrote :

sabdfl: @elopio i started a golang snap since it would be best to shift the ubuntu developer community to that rather than a PPA
elopio: @sabdfl yes πŸ™‚ the solution we are thinking about is to just use something that provides go. And if you get that, the plugin will not install it from the archive. Ideally, I think it should be flexible enough to let you use a binary curled, or a snap, or a ppa, or whatever method you have to get the binary into the build machine.
sabdfl: @elopio i think we can be much more opinionated than that
sabdfl: we want to steer people to reinforce the quality of snaps
sabdfl: i think golang is a great example of a classic snap
sabdfl: compilers in general will suit snaps very nicely

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 1616985] Re: the go plugin doesn't support go 1.7

On 3 February 2017 at 03:47, Leo Arias <email address hidden> wrote:

> sabdfl: @elopio i started a golang snap since it would be best to shift
> the ubuntu developer community to that rather than a PPA
>

I have one of them too (
https://code.launchpad.net/~mwhudson/+git/gosnap/+ref/master), I've been
slack about getting people to try it out. I'll post to snapcraft@ now...

Changed in snapcraft:
milestone: 2.27 → 2.28
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Can this be done using the new go snap tracks?

Mark

Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1616985] the go plugin doesn't support go 1.7

On Fri, 17 Feb 2017 12:22:03 +0000, Mark Shuttleworth wrote:
> Can this be done using the new go snap tracks?

Yes I was waiting for this to be released, but I also need to discuss with Colin or William on how using snaps as build-packages replacements would affect launchpad builders.

--

Changed in snapcraft:
milestone: 2.28 → none
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote : Re: the go plugin doesn't support go 1.7

Given we have a go snap now, this bug is probably invalid.

Changed in snapcraft:
status: Confirmed → Invalid
Revision history for this message
Leo Arias (elopio) wrote :

Not really, because we have to update the plugin to not install the deb if the snap is installed. Or something along that way.

Currently, the deb is always installed. And if there is no go binary in the stage dir, the go binary in $PATH will be used.

Changed in snapcraft:
status: Invalid → Confirmed
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1616985] Re: the go plugin doesn't support go 1.7

On mar, oct 31, 2017 at 1:58 AM, Leo Arias <email address hidden>
wrote:
> Not really, because we have to update the plugin to not install the
> deb
> if the snap is installed. Or something along that way.
>
> Currently, the deb is always installed. And if there is no go binary
> in
> the stage dir, the go binary in $PATH will be used.

If this is your triaging, then you need to update the title as this is
not what this bug is about.

Leo Arias (elopio)
summary: - the go plugin doesn't support go 1.7
+ the go plugin doesn't use go build-snaps
description: updated
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Just adding juju snap would also appreciate this -- we want to consume go from a specific go track and use it for building with godeps plugin.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Also worth noting my efforts to use lp builders to override PATH for the deb installed go or install the go snap in a build/prepare scriptlet didn't work.

error: cannot perform the following tasks:
- Make snap "core" (3444) available to the system (cannot cleanup failed attempt at making snap "core" available to the system: cannot remove snap current symlink: remove /snap/core/current: directory not empty)
- Make snap "core" (3444) available to the system (symlink 3444 /snap/core/current: file exists)

Cris Dywan (kalikiana)
Changed in snapcraft:
assignee: Sergio Schvezov (sergiusens) → Christian Dywan (kalikiana)
status: Confirmed → In Progress
Changed in snapcraft:
milestone: none → 2.43
assignee: Christian Dywan (kalikiana) → Michael Vogt (mvo)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
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.