fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.35k stars 497 forks source link

Attempts to install fail because of "missing do in first path element" #450

Open catskul opened 2 months ago

catskul commented 2 months ago

Attempts at installing fail:

# git clone https://github.com/fullstorydev/grpcurl
Cloning into 'grpcurl'...
remote: Enumerating objects: 1028, done.
...
# cd grpcurl/
# make
go get -d -v -t ./...
go: downloading google.golang.org/protobuf v1.33.0
...
go: downloading golang.org/x/sync v0.5.0
ng github.com/kr/text v0.2.0
go: extracting github.com/rogpeppe/go-internal v1.9.0
github.com/fullstorydev/grpcurl imports
        github.com/jhump/protoreflect/desc/protoparse imports
        github.com/bufbuild/protocompile imports
        io/fs: malformed module path "io/fs": missing dot in first path element
github.com/fullstorydev/grpcurl imports
        github.com/golang/protobuf/proto imports
        google.golang.org/protobuf/reflect/protodesc imports
        google.golang.org/protobuf/internal/editiondefaults imports
        embed: malformed module path "embed": missing dot in first path element
github.com/fullstorydev/grpcurl imports
        google.golang.org/protobuf/types/known/structpb tested by
        google.golang.org/protobuf/types/known/structpb.test imports
        github.com/google/go-cmp/cmp/cmpopts tested by
        github.com/google/go-cmp/cmp/cmpopts.test imports
        net/netip: malformed module path "net/netip": missing dot in first path element
make: *** [Makefile:21: deps] Error 1

...
# go get github.com/fullstorydev/grpcurl/cmd/grpcurl
go: finding google.golang.org/grpc v1.57.1
...
go: finding cloud.google.com/go/compute/metadata v0.2.3
build github.com/fullstorydev/grpcurl/cmd/grpcurl: cannot load embed: malformed module path "embed": missing dot in first path element
jhump commented 2 months ago

@catskul, if you look in the go.mod, you'll see that this module requires Go 1.18 or higher. If your Go SDK doesn't recognize "embed" and "net/netip" as standard library packages, then you almost certainly have an older version of Go. Update to Go 1.18 (or newer: latest version is 1.22).

catskul commented 2 months ago

Oh! Good to know, thanks!

I'm surprised that golang doesn't respect that and fail based on version, or at the very least complain.