[pkg-go] Bug#827426: golang-golang-x-tools: stringer is broken

Eric Cooper ecc at cooper-siegel.org
Thu Jun 16 01:40:52 UTC 2016


Package: golang-golang-x-tools
Version: 1:0.0~git20160315.0.f42ec61-2
Severity: important

The stringer program no longer understands how to import standard Go
packages.  For example, running "stringer -type=MyType foo.go" on the following
foo.go file:
----
    package main

    import (
	    "fmt"
    )

    type MyType int

    //go:generate stringer -type=MyType

    const (
	    Alpha MyType = 1
	    Beta MyType = 1
	    Gamma MyType = 1
    )

    func main() {
	    fmt.Println(Alpha)
    }
----

produces the error:
    stringer: checking package: foo.go:4:2: could not import fmt (can't find import: )

Running strace shows that it's looking here:
    /usr/lib/go/pkg/linux_amd64/fmt.a
But the current golang system has it here:
    /usr/lib/go-1.6/pkg/linux_amd64/fmt.a

And indeed, when I removed /usr/lib/go and symlinked it to
/usr/lib/go-1.6 instead, stringer worked correctly.  But I'm not sure
if that simple fix breaks anything else ...

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.5.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages golang-golang-x-tools depends on:
ii  golang-golang-x-tools-dev  1:0.0~git20160315.0.f42ec61-2
ii  libc6                      2.22-9

golang-golang-x-tools recommends no packages.

golang-golang-x-tools suggests no packages.

-- no debconf information



More information about the Pkg-go-maintainers mailing list