You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output shows ALL of the packages, including the indirect ones
While walking through the list of packages in the loop https://github.com/uudashr/gopkgs/blob/master/gopkgs.go#L94 we eventually stumble upon an indirect dependency which wasn't pulled by go mod vendor, which in turn results in a folder which doesn't exist, hence causing the stat error.
I guess, there're two possible solutions:
Exclude indirect dependencies by using the {{if not .Indirect}}{{.Path}};{{.Dir}}{{end}} flag value for go list -f
Somehow make go mod vendor download the indirect dependencies as well (doubt that).
From what I can see, this happens:
gopkgs
runsgo list -mod=vendor -m -f={{.Path}}\;{{.Dir}}
(notice that-mod=vendor
is not in the code, but since we haveGOFLAGS="-mod=vendor"
it'll be acting if it was): https://github.com/uudashr/gopkgs/blob/master/gopkgs.go#L366I guess, there're two possible solutions:
{{if not .Indirect}}{{.Path}};{{.Dir}}{{end}}
flag value forgo list -f
go mod vendor
download the indirect dependencies as well (doubt that).See details in microsoft/vscode-go#2800
The text was updated successfully, but these errors were encountered: