This repository has been archived by the owner on Mar 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 148
Binary target dir name has a "-" instead of "_" #634
Comments
Yes, the |
This causes problems when using
While it would find an error like:
and exit with |
This is not an answer, but an explanation. gb creates .a files in a slightly different directory layout because I was not sure if they would be compatible with output from the go tool.
… On 18 May 2018, at 18:05, Anthony Catel ***@***.***> wrote:
GoCode is using generated .a files for completion.
#634
[09:34:30] margo: agent#010: log: Gocode env: gocode.margoEnv{LibPath:"/usr/lib/go/pkg/linux_amd64:/home/paraboul/go/src/git.xxx.com/x.yyy.com/api-server/vendor/pkg/linux_amd64:/home/paraboul/go/src/git.xxx.com/x.yyy.com/api-server/pkg/linux_amd64", GOOS:"linux", GOARCH:"amd64", Compiler:"gc", GOROOT:"/usr/lib/go", GOPATH:"/home/paraboul/go/src/git.xxx.com/x.yyy.com/api-server/vendor:/home/paraboul/go/src/git.xxx.com/x.yyy.com/api-server", InstallSuffix:""}
linux_amd64 vs linux-amd64
Haven't found a proper fix yet...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@davecheney My post was actually for another project referencing this issue :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
At line 300 of gb/context.go, gb is creating the target dir name based on architecture and os by concatenating them with a "-" instead of the (seemingly?) standard "_". Here is the relevant function:
This is causing issue with our code generators that use the "types" package and the default importer with the following:
conf := types.Config{Importer: importer.Default()}
The default importer uses built binaries to discover dependencies and since they are in a pkg directory (darwin-amd64 in our case) with the "-" instead of the "_", it can't find any of our code.
Was the use of the "-" intentional? Would it be possible to change it to an "_" to match the what the go/importer lib expects?
Thank you.
The text was updated successfully, but these errors were encountered: