-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State of vendoring in 1.6.1? #93
Comments
p.s. doing a simple |
Yes, Go is expecting this to be under |
@justincormack I'm using golang:latest which expects it under /go (but i've adapted gvt docker run to use /go/src). Gvt works fine, go works fine, I just can't get go to acknowledge the vendor/ folder when using go run/go build. To reproduce:
Prints:
Expected:
What am I missing? |
|
Slight issue with WORKDIR set to /go and not /go/src in golang Dockerfile? Nope, same result:
Seems golang:latest is fine with |
@justincormack - slightly evil repro even with gvt image:
Same go version, |
I'm also having no joy against the 1.5 branch:
The above runs only if I |
Update: -v I have no idea why |
No its not that, the problem is if you |
Put the code anywhere under |
@justincormack I can confirm that |
Yes, Go is very (annoyingly) fussy. |
Something doesn't track here. I was using -v And now if to mount under /go/src/app, it would become /go/src/app/src. Vendor/ dir would be in /go/src/app/src/vendor/ and would work for /go/src/app/src/main.go - but it wouldn't work for a subpackage. If I have a subpackage "proxy" (import "./proxy") it will not find the package from the root vendor/, and it will not find a package inside /go/src/app/src/proxy/vendor either.
I have no idea what I should do with this underscore. I'm not even sure if this is a packaging problem, or if I should file the issue against golang directly, or If I just need to sleep and try reading the documentation and work this out tomorrow. |
You don't want a |
Sure, |
So, I figured out that local imports ("./subpackage") don't work with vendoring. More information is available in the issue upstream. If you're doing something similar and you're coming across this thread, please see this upstream issue for a work-around. |
I'm trying to start with vendoring and Go 1.6.1, but I'm having issues in the sense that my vendor folder isn't getting picked up:
From what I understood, I should never use '/vendor/' in import paths, so I'm using this:
but with no success. Any ideas what's going on here? I created the vendor/ folder with
gvt fetch
(using justin cormacks docker image from docker hub).The text was updated successfully, but these errors were encountered: