pact-foundation / pact-go

Golang version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
http://pact.io
MIT License
856 stars 108 forks source link

go get failure when importing the 2.x branch #181

Closed pcting closed 3 years ago

pcting commented 3 years ago

Software versions

Expected behaviour

go package installs without incident.

Actual behaviour

$ go get github.com/pact-foundation/pact-go/v2/@2.0.0-beta.6
github.com/pact-foundation/pact-go/v2 imports
        github.com/pact-foundation/pact-go/v2/command imports
        github.com/pact-foundation/pact-go/v2/installer imports
        github.com/hashicorp/go-getter imports
        cloud.google.com/go/storage imports
        google.golang.org/api/option imports
        google.golang.org/api/internal imports
        google.golang.org/grpc/naming: cannot find module providing package google.golang.org/grpc/naming

Steps to reproduce

see above

Relevent log files

Please ensure you set logging to DEBUG and attach any relevant log files here (or link from a gist).

mefellows commented 3 years ago

Thanks, I'll have to take a look.

FWIW I know this build works, but it's with beta 5: https://github.com/pactflow/terraform-provider-pact/blob/master/Makefile#L59

pcting commented 3 years ago

There must be an issue with my environment. I have the same error with beta 5:

$ go get github.com/pact-foundation/pact-go/v2/@2.0.0-beta.5
github.com/pact-foundation/pact-go/v2 imports
        github.com/pact-foundation/pact-go/v2/command imports
        github.com/pact-foundation/pact-go/v2/installer imports
        github.com/hashicorp/go-getter imports
        cloud.google.com/go/storage imports
        google.golang.org/api/option imports
        google.golang.org/api/internal imports
        google.golang.org/grpc/naming: cannot find module providing package google.golang.org/grpc/naming
pcting commented 3 years ago

strange, this is what i get when i try to pull down that grpc package directly:

$ go get google.golang.org/grpc/naming
go get: module google.golang.org/grpc@upgrade found (v1.41.0), but does not contain package google.golang.org/grpc/naming
pcting commented 3 years ago

i'm closing this out. i was able to get pass this by passing -u in the argument:

$ go get -u github.com/pact-foundation/pact-go/v2/@2.0.0-beta.6
...
go get: upgraded github.com/pact-foundation/pact-go/v2 v2.0.0-20210621102432-26b32fd1552a => v2.0.0-beta.2.0.20210809072433-a3634c9437d7
mefellows commented 3 years ago

Thanks for the follow up!