-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/vgo: won't compile a program that embeds a struct from another library #26198
Comments
https://github.com/kevinmichaelchen/vgo-embedded-struct/blob/master/main.go
https://github.com/kevinmichaelchen/foo/blob/master/foo.go
Cuz there is no Cow type in package foo. This has nothing to do with vgo. |
@AlexRouSg Yup, my bad. Fixed it and I was trying (unsuccessfully) to reproduce an issue in github.com/sfreiberg/gotwilio:
|
Check your go.mod file, jwt.StandardClaims was added in v3.0.0. As vgo doesn't allow using > v1 without a go.mod file present, and since there is a v1.0.0 tag. I suspect it defaults to v1.0.0. As legacy packages would use either v1.0.0 or the pseudo version v0.0.0-date-hash, since v1.0.0 is "newer" than v0.0.0 it uses that. I feel like I've seen a issue to fix the order, but I cannot find it. So if using the latest vgo is still showing the same behavior then what you can do is either get the package maintainer of |
@AlexRouSg thanks, so this has nothing to do with vgo. I was just had wrong configurations. This is what I ended up with:
|
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I've reproduced the issue with 2 minimal repos
Bar
Bar
Running
vgo install ./...
from insidevgo-embedded-struct
gives the errorIf possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
I think I expected it to compile, unless I'm missing something.
What did you see instead?
I saw
vgo install ./...
give the aforementioned error.The text was updated successfully, but these errors were encountered: