Help tracking down module dependencies

359 views
Skip to first unread message

Justin Israel

unread,
Sep 23, 2018, 7:59:36 PM9/23/18
to golang-nuts
I'm converting one of my internal projects from glide to a module, after having done two other conversions. But I am hitting a problem that I can't yet solve.

$ GO111MODULE=on go mod tidy -v

https fetch failed: Get https://gotest.tools?go-get=1: Forbidden
go: gotest...@v2.1.0+incompatible: unrecognized import path "gotest.tools" (https fetch failed: Get https://gotest.tools?go-get=1: Forbidden)
go: error loading module requirements

My http proxy won't let me access this, and I can't find usage of it anywhere in my own codebase or in the immediate dependencies (or even my $GOPATH). The mod subcommand isn't being very specific about where this dependency is coming from (even with the graph command). Any pointers would be greatly appreciated. The dependency didn't show up in my glide.lock originally.

My module requirements are:


Justin

thepud...@gmail.com

unread,
Sep 24, 2018, 12:31:43 AM9/24/18
to golang-nuts
Hi Justin,

I'm not sure where that gotest.tools is coming from in your particular build, and not sure of the root cause of the issue with your http proxy.

However, one thing you could try is a 'replace' directive to try to get gotest.tools directly from github. I don't know if that will help your particular situation, but you could try adding something like the following to the end of your go.mod file:

   replace gotest.tools => github.com/gotestyourself/gotest.tools v2.1.0+incompatible

There is some chance that might work around the issue with your http proxy.  (And if that starts to complain instead about a failed replace, you could also try adding an explicit 'require gotest.tools v2.1.0+incompatible' or maybe even 'require gotest.tools v0.0.0' in your go.mod file).

--thepudds

Justin Israel

unread,
Sep 24, 2018, 2:37:44 AM9/24/18
to thepud...@gmail.com, golang-nuts
On Mon, Sep 24, 2018 at 4:31 PM <thepud...@gmail.com> wrote:
Hi Justin,

I'm not sure where that gotest.tools is coming from in your particular build, and not sure of the root cause of the issue with your http proxy.

However, one thing you could try is a 'replace' directive to try to get gotest.tools directly from github. I don't know if that will help your particular situation, but you could try adding something like the following to the end of your go.mod file:

   replace gotest.tools => github.com/gotestyourself/gotest.tools v2.1.0+incompatible

This fixed my problem. Thanks! My proxy is perfectly happy with the github.com domain.
I still don't know where that original dependency was coming from, and it would have been really cool if "go mod" could have told me some more verbose output, since it obviously knows.
 

There is some chance that might work around the issue with your http proxy.  (And if that starts to complain instead about a failed replace, you could also try adding an explicit 'require gotest.tools v2.1.0+incompatible' or maybe even 'require gotest.tools v0.0.0' in your go.mod file).

--thepudds

On Sunday, September 23, 2018 at 7:59:36 PM UTC-4, Justin Israel wrote:
I'm converting one of my internal projects from glide to a module, after having done two other conversions. But I am hitting a problem that I can't yet solve.

$ GO111MODULE=on go mod tidy -v

https fetch failed: Get https://gotest.tools?go-get=1: Forbidden
go: gotest...@v2.1.0+incompatible: unrecognized import path "gotest.tools" (https fetch failed: Get https://gotest.tools?go-get=1: Forbidden)
go: error loading module requirements

My http proxy won't let me access this, and I can't find usage of it anywhere in my own codebase or in the immediate dependencies (or even my $GOPATH). The mod subcommand isn't being very specific about where this dependency is coming from (even with the graph command). Any pointers would be greatly appreciated. The dependency didn't show up in my glide.lock originally.

My module requirements are:


Justin

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages