-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/tools/gopls: Does GOPACKAGESDRIVER support custom packages ? #69501
Comments
Hello @findleyr , can you help us look into this issue? I'm not sure if this capability is supported now. |
As far as I can tell, you want the Could you explain the problem in more detail? |
Sorry @adonovan ,it may have mentioned the wrong issue category. We use GOPACKAGESDRIVER in the hope of injecting three-way packages, in the form of github.com/hertz_gen/a, but using go mod tidy will go and pull the packages remotely, resulting in a package does not exist error. I'm currently wondering if GOPACKAGESDRIVER supports emulating three-way packages and go mod tidy doesn't report an error? We can resubmit an issue to the correct category. |
I have not heard the term "three-way package" before. What does it mean? |
sry,it is Third-Party Packages😞 such as |
It is exactly what I mean, when I using gopackgesdriver to build a pacakge like this, |
GOPACKAGESDRIVER is for when you are using a build system other than the Go command. In general, other build systems are not compatible (or fully compatible) with the Go command's module system--some don't really use modules at all--so What build system are you using? What program is GOPACKAGESDRIVER set to? Neither of the two GitHub repos you mentioned (github.com/protoc_gen/service and github.com/hertz_gen/a) are readable to me. Do they require authentication? Are you trying to use GOPACKAGESDRIVER as some kind of authentication proxy? |
It's unclear exactly what you are trying to achieve - go command does not understand If your issue is about working with private or unpublished modules and you still use the
I hope one of the above can help you achieve what you want. For further questions, please use the channels listed in https://go.dev/wiki/Questions Closing since it is not a gopls issue nor GOPACKAGESDRIVER issue. |
gopls version
gopls -v version
Build info
golang.org/x/tools/gopls v0.16.1
golang.org/x/tools/[email protected] h1:1hO/dCeUvjEYx3V0rVvCtOkwnpEpqS29paE+Jw4dcAc=
github.com/BurntSushi/[email protected] h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/google/[email protected] h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
golang.org/x/exp/[email protected] h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
golang.org/x/[email protected] h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/[email protected] h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/[email protected] h1:3Wt8mZlbFwG8llny+t18kh7AXxyWePFycXMuVdHxnyM=
golang.org/x/[email protected] h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/[email protected] h1:Kd+Z5Pm6uwYx3T2KEkeHMHUMZxDPb/q6b1m+zEcy62c=
golang.org/x/[email protected] h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
honnef.co/go/[email protected] h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
mvdan.cc/[email protected] h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
mvdan.cc/xurls/[email protected] h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.22.6
go env
What did you do?
I use GOPACKAGESDRIVER to build a custom package which name's
github.com/xxx/xxx
What did you see happen?
when I execute
go mod tidy
,it will throw an error:(base) ViolaPioggiadeMacBook-Air:rgo_test violapioggia$ go mod tidy
go: finding module for package github.com/xxx
go: test imports
github.com/xxx: cannot find module providing package github.com/xxx: module github.com/xxx: git ls-remote -q origin in /Users/violapioggia/go/pkg/mod/cache/vcs/6d9364d47d76a0951f605c504e9f49ac68af057ddde3e30b0f18dcf04c652806: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/xxx: not found
What did you expect to see?
I want I can import custom_pacakge
github.com/xxx
by GOPACKAGESDRIVER like normal package and executego mod tidy
won't throw an errorEditor and settings
{
"go.toolsEnvVars": {
"GOPACKAGESDRIVER": "${env:GOPATH}/bin/mypackagesdriver"
},
}
Logs
No response
The text was updated successfully, but these errors were encountered: