<div dir="ltr">I've forgotten everything about this code even though I wrote it, but wouldn't it be better to filter out the standard library dependencies?</div><br><div class="gmail_quote"><div dir="ltr">On Sun, 26 Aug 2018 at 04:03, Shengjing Zhu <<a href="mailto:i@zhsj.me">i@zhsj.me</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Package: dh-golang<br>
Severity: important<br>
Tags: patch<br>
<br>
Dear Maintainer,<br>
<br>
dh-golang failed to build with gccgo-8.<br>
<br>
   dh_golang -O--buildsystem=golang<br>
        "go list -f '{{ range .Deps }}{{.}}\<br>
{{ end }}'" <a href="http://github.com/elves/elvish" rel="noreferrer" target="_blank">github.com/elves/elvish</a> [...]<br>
        "go list -f '\\\<br>
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}'" bufio bytes [...]<br>
template: main:2:14: executing "main" at <index (or .GoFiles ....>: error calling index: index out of range: 0<br>
dh_golang: go list -f '\<br>
{{ .Dir }}/{{ index (or .GoFiles .CgoFiles .TestGoFiles .XTestGoFiles .IgnoredGoFiles) 0 }}' returned exit code 1<br>
make: *** [debian/rules:18: binary] Error 1<br>
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2<br>
<br>
The reason is that since gccgo-8, `go list {{ .Deps }}` will return<br>
standard library. But it can't return the source files for standard<br>
library. So the template will execute things like `index [] 0`.<br>
<br>
Patch is attached.<br>
<br>
-- <br>
Best regards,<br>
Shengjing Zhu<br>
_______________________________________________<br>
Pkg-go-maintainers mailing list<br>
<a href="mailto:Pkg-go-maintainers@alioth-lists.debian.net" target="_blank">Pkg-go-maintainers@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers</a></blockquote></div>