Closed nim-nim closed 5 years ago
What golist
binary did you use? From the go-compilers package or from the one pushed in this repo?
Tested with golist
from the go-compilers-golang-compiler-1-29.fc29.x86_64
over 0bfd3b39853cdde5762efda92289f14b0ac0491b
hexsha of github.com/rubiojr/go-vhd
:
$ golist --package-path github.com/rubiojr/go-vhd --to-install
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd/cli.go
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd/version.go
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd/vhd
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd/vhd/util.go
/home/jchaloup/Packages/upstream/src/github.com/rubiojr/go-vhd/vhd/vhd.go
Though, I am able to reproduce it during the rpmbuild
.
I'm mostly using a golist rebuilt from sources in its own rpm except for very early builds where it has not been bootstrapped yet. (Will probably post a fist set of specs for inclusion in devel in the next days. The set passes mock I need to pt it through copr too. They will depend on some of the PRs you've not accepter yet, as bootstraping google-cloud is tricky without them)
2018/03/23 16:49:12 unexpected directory layout:
import path: _/builddir/build/BUILD/go-vhd-0bfd3b39853cdde5762efda92289f14b0ac0491b/_build/src/github.com/rubiojr/go-vhd/vhd
root: /builddir/build/BUILD/go-vhd-0bfd3b39853cdde5762efda92289f14b0ac0491b/_build/src
dir: /builddir/build/BUILD/go-vhd-0bfd3b39853cdde5762efda92289f14b0ac0491b/_build/src/github.com/rubiojr/go-vhd/vhd
expand root: /builddir/build/BUILD/go-vhd-0bfd3b39853cdde5762efda92289f14b0ac0491b/_build/src
expand dir: /builddir/build/BUILD/go-vhd-0bfd3b39853cdde5762efda92289f14b0ac0491b/vhd
separator: /
Why is the import path prefixed with _
?
no idea :)
It's nowhere in the spec or shell code, that's something golists constructs itself
(the log traces the arguments given to the shell wrapper, nothing to see there)
Because https://github.com/rubiojr/go-vhd/blob/master/cli.go#L4:
package main
import (
"./vhd"
"fmt"
...
)
The "./vhd"
is the culprit.
so, what is the correct solution? Have golist learn to parse it? Patch the code?
This has nothing to do with the golist
as the affected code is inside the golang stdlib. The problem is the GOPATH and symlinks. Not sure if we can fix it on our side.
Ok, I'll workaround then. Nothing that can be fixed in the shell wrapper either, it's already setting all the correct env variable and even cd-ing to the fake gopath directory.
Thanksfully it seems Google is fed up with GOPATH directory tricks too and is starting to talk about adding a manifest and a zip envelope for Go 11.
Migrated to https://pagure.io/golist/issue/10
golist fails to output project go files on github.com/rubiojr/go-vhd (works fine on hundreds of other Go projects)