micro / go-micro

A Go microservices framework
https://go-micro.dev
Apache License 2.0
21.85k stars 2.35k forks source link

Too many unused package when run go mod tidy #434

Closed xpunch closed 5 years ago

xpunch commented 5 years ago

I want to use go micro as the micro service framework, and I only import github.com/micro/go-micro to create a Service. When I run go mod tidy -v, it takes me half an hour to check packages from remote server. And a lot unused pkg is download, I think if we want go-micro to be a pluggable framework, maybe we need to reduce the core of go-micro, move non-default implementation into go-plugins module.

The demo project have a go.sum with 1148 lines, some pkg is never used in my service like github.com/SAP/go-hdb, github.com/coreos/etcd.

Or maybe we can improve the module dependence?

xpunch commented 5 years ago

go.sum

cloud.google.com/go v0.23.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.33.1/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.35.1/go.mod h1:wfjPZNvXCBYESy3fIynybskMP48KVPrjSPCnXiK7Prg=

duplicated pkg with different versions

xpunch commented 5 years ago

complete log of go mod tidy

go: finding github.com/hashicorp/yamux latest
go: finding github.com/google/gofuzz latest
go: finding github.com/hashicorp/go-discover latest
go: finding github.com/hashicorp/hcl/hcl/ast latest
go: finding github.com/hashicorp/hcl/hcl/printer latest
go: finding github.com/hashicorp/hcl/hcl latest
go: finding github.com/shirou/gopsutil/host latest
go: finding github.com/gogo/protobuf/types latest
go: finding github.com/gogo/googleapis/google/rpc latest
go: finding github.com/hashicorp/go-memdb latest
go: finding github.com/gogo/googleapis/google latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2 latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api/v2/listener latest
go: finding github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2 latest
go: finding github.com/envoyproxy/go-control-plane/pkg/util latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api/v2/auth latest
go: finding github.com/envoyproxy/go-control-plane/envoy/service/discovery latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api/v2 latest
go: finding github.com/envoyproxy/go-control-plane/pkg latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz latest
go: finding github.com/envoyproxy/go-control-plane/envoy/service latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter/network latest
go: finding github.com/envoyproxy/go-control-plane/envoy latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter latest
go: finding github.com/hashicorp/go-discover/provider/k8s latest
Fetching https://golang.org/x/time/rate?go-get=1
go: finding github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha latest
go: finding github.com/gogo/protobuf/jsonpb latest
go: finding github.com/DataDog/datadog-go/statsd latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config latest
go: finding github.com/hashicorp/go-discover/provider latest
go: finding github.com/envoyproxy/go-control-plane/envoy/service/auth latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2 latest
go: finding github.com/gogo/protobuf/proto latest
go: finding github.com/prometheus/client_golang/prometheus/promhttp latest
go: finding github.com/prometheus/client_golang/prometheus latest
go: finding github.com/DataDog/datadog-go latest
go: finding github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy latest
go: finding github.com/envoyproxy/go-control-plane/envoy/api/v2/core latest
go: finding github.com/shirou/gopsutil/mem latest
go: finding github.com/shirou/gopsutil/disk latest
Parsing meta tags from https://golang.org/x/time/rate?go-get=1 (status code 200)
get "golang.org/x/time/rate": found meta tag get.metaImport{Prefix:"golang.org/x/time", VCS:"git", RepoRoot:"https://go.googlesource.com/time"} at https://golang.org/x/time/rate?go-get=1
get "golang.org/x/time/rate": verifying non-authoritative meta tag
Fetching https://golang.org/x/time?go-get=1
go: finding github.com/shirou/gopsutil/cpu latest
Parsing meta tags from https://golang.org/x/time?go-get=1 (status code 200)
go: finding golang.org/x/time/rate latest
Fetching https://golang.org/x/time?go-get=1
Parsing meta tags from https://golang.org/x/time?go-get=1 (status code 200)
get "golang.org/x/time": found meta tag get.metaImport{Prefix:"golang.org/x/time", VCS:"git", RepoRoot:"https://go.googlesource.com/time"} at https://golang.org/x/time?go-get=1
go: finding golang.org/x/time latest
go: finding github.com/hashicorp/raft-boltdb latest
go: finding github.com/docker/go-connections/sockets latest
go: finding github.com/hashicorp/net-rpc-msgpackrpc latest
go: finding github.com/coredns/coredns/plugin/pkg/dnsutil latest
go: finding github.com/coredns/coredns/plugin/pkg latest
go: finding github.com/coredns/coredns/plugin latest
go: finding github.com/hashicorp/hil latest
go: finding github.com/hashicorp/hil/ast latest
go: finding github.com/hashicorp/vault/api latest
go: finding github.com/hashicorp/vault/vault latest
go: finding github.com/hashicorp/vault/http latest
go: finding github.com/hashicorp/vault/builtin/logical/pki latest
go: finding github.com/hashicorp/vault/builtin/logical latest
go: finding github.com/hashicorp/vault/builtin latest
go: finding github.com/StackExchange/wmi latest
go: finding github.com/keybase/go-crypto/openpgp latest
go: finding github.com/SermoDigital/jose/jws latest
go: finding github.com/SermoDigital/jose/crypto latest
go: finding github.com/hashicorp/vault-plugin-secrets-kv latest
go: finding github.com/keybase/go-crypto latest
go: finding github.com/hashicorp/vault-plugin-auth-jwt latest
go: finding github.com/lyft/protoc-gen-validate/validate latest
go: finding github.com/shirou/w32 latest
go: finding github.com/hashicorp/vault-plugin-auth-kubernetes latest
Fetching https://gopkg.in/mgo.v2?go-get=1
go: finding github.com/asaskevich/govalidator latest
go: finding github.com/hashicorp/vault-plugin-secrets-gcp/plugin latest
go: finding github.com/hashicorp/vault-plugin-secrets-gcp latest
go: finding github.com/hashicorp/vault-plugin-auth-gcp/plugin latest
go: finding github.com/chrismalek/oktasdk-go/okta latest
go: finding github.com/hashicorp/vault-plugin-auth-gcp latest
go: finding github.com/hashicorp/vault-plugin-secrets-gcpkms latest
Parsing meta tags from https://gopkg.in/mgo.v2?go-get=1 (status code 200)
get "gopkg.in/mgo.v2": found meta tag get.metaImport{Prefix:"gopkg.in/mgo.v2", VCS:"git", RepoRoot:"https://gopkg.in/mgo.v2"} at https://gopkg.in/mgo.v2?go-get=1
go: finding github.com/chrismalek/oktasdk-go latest
go: finding github.com/hashicorp/vault-plugin-auth-alicloud latest
go: finding github.com/hashicorp/go-plugin latest
go: finding github.com/hashicorp/vault-plugin-auth-azure latest
go: finding github.com/hashicorp/vault-plugin-secrets-ad/plugin latest
go: finding github.com/hashicorp/vault-plugin-secrets-azure latest
go: finding github.com/keybase/go-crypto/openpgp/packet latest
go: finding github.com/SermoDigital/jose/jwt latest
Fetching https://layeh.com/radius?go-get=1
go: finding github.com/fullsailor/pkcs7 latest
go: finding github.com/hashicorp/vault-plugin-secrets-ad latest
go: finding github.com/pquerna/otp/totp latest
Fetching https://layeh.com/radius/rfc2865?go-get=1
go: finding github.com/SAP/go-hdb/driver latest
go: finding gopkg.in/mgo.v2 latest
Parsing meta tags from https://layeh.com/radius?go-get=1 (status code 200)
get "layeh.com/radius": found meta tag get.metaImport{Prefix:"layeh.com/radius", VCS:"git", RepoRoot:"https://github.com/layeh/radius"} at https://layeh.com/radius?go-get=1
Parsing meta tags from https://layeh.com/radius/rfc2865?go-get=1 (status code 200)
get "layeh.com/radius/rfc2865": found meta tag get.metaImport{Prefix:"layeh.com/radius", VCS:"git", RepoRoot:"https://github.com/layeh/radius"} at https://layeh.com/radius/rfc2865?go-get=1
get "layeh.com/radius/rfc2865": verifying non-authoritative meta tag
Fetching https://layeh.com/radius?go-get=1
go: finding github.com/hashicorp/vault-plugin-secrets-alicloud latest
go: finding github.com/tv42/httpunix latest
go: finding github.com/google/go-github/github latest
Parsing meta tags from https://layeh.com/radius?go-get=1 (status code 200)
go: finding layeh.com/radius latest
go: finding layeh.com/radius/rfc2865 latest
Fetching https://gopkg.in/ory-am/dockertest.v2?go-get=1
Fetching https://launchpad.net/gocheck?go-get=1
go: finding github.com/hashicorp/vault-plugin-auth-centrify latest
Parsing meta tags from https://gopkg.in/ory-am/dockertest.v2?go-get=1 (status code 200)
get "gopkg.in/ory-am/dockertest.v2": found meta tag get.metaImport{Prefix:"gopkg.in/ory-am/dockertest.v2", VCS:"git", RepoRoot:"https://gopkg.in/ory-am/dockertest.v2"} at https://gopkg.in/ory-am/dockertest.v2?go-get=1
go: finding github.com/gocql/gocql latest
Parsing meta tags from https://launchpad.net/gocheck?go-get=1 (status code 200)
get "launchpad.net/gocheck": found meta tag get.metaImport{Prefix:"launchpad.net/gocheck", VCS:"bzr", RepoRoot:"https://launchpad.net/~niemeyer/gocheck/trunk"} at https://launchpad.net/gocheck?go-get=1
go: finding github.com/duosecurity/duo_api_golang latest
go: finding github.com/duosecurity/duo_api_golang/authapi latest
go: finding github.com/hashicorp/nomad/api latest
go: finding github.com/influxdata/influxdb/client/v2 latest
go: finding github.com/influxdata/influxdb/client latest
Fetching https://gopkg.in/square/go-jose.v2/jwt?go-get=1
Parsing meta tags from https://gopkg.in/square/go-jose.v2/jwt?go-get=1 (status code 200)
get "gopkg.in/square/go-jose.v2/jwt": found meta tag get.metaImport{Prefix:"gopkg.in/square/go-jose.v2", VCS:"git", RepoRoot:"https://gopkg.in/square/go-jose.v2"} at https://gopkg.in/square/go-jose.v2/jwt?go-get=1
get "gopkg.in/square/go-jose.v2/jwt": verifying non-authoritative meta tag
Fetching https://gopkg.in/square/go-jose.v2?go-get=1
go: finding github.com/go-ole/go-ole/oleutil latest
Parsing meta tags from https://gopkg.in/square/go-jose.v2?go-get=1 (status code 200)
Fetching https://gopkg.in/square/go-jose.v2?go-get=1
go: finding github.com/briankassouf/jose/jwt latest
go: finding github.com/briankassouf/jose/jws latest
Parsing meta tags from https://gopkg.in/square/go-jose.v2?go-get=1 (status code 200)
get "gopkg.in/square/go-jose.v2": found meta tag get.metaImport{Prefix:"gopkg.in/square/go-jose.v2", VCS:"git", RepoRoot:"https://gopkg.in/square/go-jose.v2"} at https://gopkg.in/square/go-jose.v2?go-get=1
go: finding github.com/Azure/go-ansiterm/winterm latest
go: finding github.com/Azure/go-ansiterm latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/providers latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/services/ram latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/services/sts latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/services latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints latest
go: finding github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth latest
go: finding github.com/briankassouf/jose/crypto latest
go: finding github.com/streadway/amqp latest
go: finding github.com/mitchellh/pointerstructure latest
go: finding github.com/gorhill/cronexpr latest
go: finding github.com/gammazero/workerpool latest
Fetching https://gopkg.in/asn1-ber.v1?go-get=1
go: finding github.com/influxdata/platform/models latest
go: finding github.com/jeffchao/backoff latest
go: finding github.com/boombuler/barcode/qr latest
Parsing meta tags from https://gopkg.in/asn1-ber.v1?go-get=1 (status code 200)
get "gopkg.in/asn1-ber.v1": found meta tag get.metaImport{Prefix:"gopkg.in/asn1-ber.v1", VCS:"git", RepoRoot:"https://gopkg.in/asn1-ber.v1"} at https://gopkg.in/asn1-ber.v1?go-get=1
go: finding github.com/influxdata/platform latest
go: finding github.com/ugorji/go/codec latest
go: finding github.com/Nvveen/Gotty latest
go: finding gopkg.in/asn1-ber.v1 latest
go: finding github.com/gotestyourself/gotestyourself/assert latest
go: finding github.com/bitly/go-hostpool latest
go: finding github.com/gotestyourself/gotestyourself/assert/cmp latest
go: finding github.com/hashicorp/go-gcp-common/gcputil latest
Fetching https://go.opencensus.io/plugin/ochttp?go-get=1
Fetching https://contrib.go.opencensus.io/exporter/stackdriver/propagation?go-get=1
go: finding github.com/hashicorp/go-gcp-common latest
Fetching https://go.opencensus.io/plugin/ocgrpc?go-get=1
Parsing meta tags from https://contrib.go.opencensus.io/exporter/stackdriver/propagation?go-get=1 (status code 200)
get "contrib.go.opencensus.io/exporter/stackdriver/propagation": found meta tag get.metaImport{Prefix:"contrib.go.opencensus.io/exporter/stackdriver", VCS:"git", RepoRoot:"https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver"} at https://contrib.go.opencensus.io/exporter/stackdriver/propagation?go-get=1
get "contrib.go.opencensus.io/exporter/stackdriver/propagation": verifying non-authoritative meta tag
Fetching https://contrib.go.opencensus.io/exporter/stackdriver?go-get=1
Parsing meta tags from https://go.opencensus.io/plugin/ocgrpc?go-get=1 (status code 200)
Parsing meta tags from https://contrib.go.opencensus.io/exporter/stackdriver?go-get=1 (status code 200)
get "go.opencensus.io/plugin/ocgrpc": found meta tag get.metaImport{Prefix:"go.opencensus.io", VCS:"git", RepoRoot:"https://github.com/census-instrumentation/opencensus-go"} at https://go.opencensus.io/plugin/ocgrpc?go-get=1
get "go.opencensus.io/plugin/ocgrpc": verifying non-authoritative meta tag
Fetching https://go.opencensus.io?go-get=1
Parsing meta tags from https://go.opencensus.io/plugin/ochttp?go-get=1 (status code 200)
get "go.opencensus.io/plugin/ochttp": found meta tag get.metaImport{Prefix:"go.opencensus.io", VCS:"git", RepoRoot:"https://github.com/census-instrumentation/opencensus-go"} at https://go.opencensus.io/plugin/ochttp?go-get=1
get "go.opencensus.io/plugin/ochttp": verifying non-authoritative meta tag
Parsing meta tags from https://go.opencensus.io?go-get=1 (status code 200)
go: finding github.com/bmizerany/assert latest
go: finding github.com/opencontainers/image-spec/specs-go latest
go: finding github.com/containerd/continuity/pathdriver latest
go: finding github.com/containerd/continuity latest
go: finding contrib.go.opencensus.io/exporter/stackdriver/propagation latest
go: finding github.com/garyburd/redigo/redis latest
go: finding github.com/opencontainers/runc/libcontainer/user latest
Fetching https://contrib.go.opencensus.io/exporter/stackdriver?go-get=1
Parsing meta tags from https://contrib.go.opencensus.io/exporter/stackdriver?go-get=1 (status code 200)
get "contrib.go.opencensus.io/exporter/stackdriver": found meta tag get.metaImport{Prefix:"contrib.go.opencensus.io/exporter/stackdriver", VCS:"git", RepoRoot:"https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver"} at https://contrib.go.opencensus.io/exporter/stackdriver?go-get=1
go: finding github.com/opencontainers/runc/libcontainer latest
go: finding go.opencensus.io/plugin/ocgrpc latest
go: finding go.opencensus.io/plugin/ochttp latest
go: finding github.com/ory-am/common/env latest
Fetching https://go.opencensus.io/plugin?go-get=1
go: finding github.com/centrify/cloud-golang-sdk/oauth latest
go: finding github.com/centrify/cloud-golang-sdk/restapi latest
Parsing meta tags from https://go.opencensus.io/plugin?go-get=1 (status code 200)
get "go.opencensus.io/plugin": found meta tag get.metaImport{Prefix:"go.opencensus.io", VCS:"git", RepoRoot:"https://github.com/census-instrumentation/opencensus-go"} at https://go.opencensus.io/plugin?go-get=1
get "go.opencensus.io/plugin": verifying non-authoritative meta tag
go: finding go.opencensus.io/plugin latest
Fetching https://go.opencensus.io?go-get=1
go: finding github.com/centrify/cloud-golang-sdk latest
go: finding github.com/samuel/go-zookeeper/zk latest
Parsing meta tags from https://go.opencensus.io?go-get=1 (status code 200)
get "go.opencensus.io": found meta tag get.metaImport{Prefix:"go.opencensus.io", VCS:"git", RepoRoot:"https://github.com/census-instrumentation/opencensus-go"} at https://go.opencensus.io?go-get=1
go: finding github.com/mattbaird/elastigo/lib latest
go: finding github.com/samuel/go-zookeeper latest
go: finding github.com/mattbaird/elastigo latest
go: finding github.com/coreos/etcd/clientv3 latest
Fetching https://gopkg.in/fatih/pool.v2?go-get=1
Fetching https://gopkg.in/gorethink/gorethink.v4/ql2?go-get=1
Fetching https://gopkg.in/gorethink/gorethink.v4/encoding?go-get=1
Fetching https://gopkg.in/gorethink/gorethink.v4/internal/integration/tests?go-get=1
Fetching https://gopkg.in/gorethink/gorethink.v4/types?go-get=1
go: finding github.com/gammazero/deque latest
go: finding github.com/pquerna/cachecontrol latest
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/ql2?go-get=1 (status code 200)
get "gopkg.in/gorethink/gorethink.v4/ql2": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/ql2?go-get=1
get "gopkg.in/gorethink/gorethink.v4/ql2": verifying non-authoritative meta tag
Fetching https://gopkg.in/gorethink/gorethink.v4?go-get=1
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/encoding?go-get=1 (status code 200)
get "gopkg.in/gorethink/gorethink.v4/encoding": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/encoding?go-get=1
get "gopkg.in/gorethink/gorethink.v4/encoding": verifying non-authoritative meta tag
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/internal/integration/tests?go-get=1 (status code 200)
get "gopkg.in/gorethink/gorethink.v4/internal/integration/tests": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/internal/integration/tests?go-get=1
get "gopkg.in/gorethink/gorethink.v4/internal/integration/tests": verifying non-authoritative meta tag
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4?go-get=1 (status code 200)
Fetching https://gopkg.in/gorethink/gorethink.v4?go-get=1
Fetching https://gopkg.in/gorethink/gorethink.v4/internal/integration?go-get=1
go: finding github.com/coreos/pkg/capnslog latest
go: finding github.com/coreos/pkg latest
go: finding github.com/araddon/gou latest
Parsing meta tags from https://gopkg.in/fatih/pool.v2?go-get=1 (status code 200)
get "gopkg.in/fatih/pool.v2": found meta tag get.metaImport{Prefix:"gopkg.in/fatih/pool.v2", VCS:"git", RepoRoot:"https://gopkg.in/fatih/pool.v2"} at https://gopkg.in/fatih/pool.v2?go-get=1
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4?go-get=1 (status code 200)
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/types?go-get=1 (status code 200)
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/internal/integration?go-get=1 (status code 200)
get "gopkg.in/gorethink/gorethink.v4": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4?go-get=1
get "gopkg.in/gorethink/gorethink.v4/types": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/types?go-get=1
get "gopkg.in/gorethink/gorethink.v4/internal/integration": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/internal/integration?go-get=1
get "gopkg.in/gorethink/gorethink.v4/types": verifying non-authoritative meta tag
get "gopkg.in/gorethink/gorethink.v4/internal/integration": verifying non-authoritative meta tag
Fetching https://gopkg.in/gorethink/gorethink.v4/internal?go-get=1
Parsing meta tags from https://gopkg.in/gorethink/gorethink.v4/internal?go-get=1 (status code 200)
get "gopkg.in/gorethink/gorethink.v4/internal": found meta tag get.metaImport{Prefix:"gopkg.in/gorethink/gorethink.v4", VCS:"git", RepoRoot:"https://gopkg.in/gorethink/gorethink.v4"} at https://gopkg.in/gorethink/gorethink.v4/internal?go-get=1
get "gopkg.in/gorethink/gorethink.v4/internal": verifying non-authoritative meta tag
go: finding github.com/tmc/grpc-websocket-proxy/wsproxy latest
go: finding github.com/golang/groupcache/lru latest
go: finding github.com/xiang90/probing latest
go: finding github.com/tmc/grpc-websocket-proxy latest
go: finding github.com/golang/groupcache latest
go: finding github.com/coreos/go-semver/semver latest
go: finding github.com/coreos/go-systemd/journal latest
go: finding github.com/coreos/go-systemd latest
unused contrib.go.opencensus.io/exporter/stackdriver
unused github.com/go-ini/ini
xpunch commented 5 years ago

I've run go mod why test some pkgs, found it's indirect import from go-plugins. go-plugins contains too many components When we want to use one of those component, we indirect import all the dependencies.

asim commented 5 years ago

Go-micro does not import go-plugins. Where are you importing this from?

xpunch commented 5 years ago

Sorry, test on the wrong module, I try fetch your repo again, and run go mod tidy, a lot of new reference is added to my go.mod file, but when I pick a indirect pkg in go.sum with go mod why, it tells me the main module does not need this package.

~:go mod why github.com/SAP/go-hdb
# github.com/SAP/go-hdb
(main module does not need package github.com/SAP/go-hdb)

I'm using go 1.12.0, still can't figure out the problem.

xpunch commented 5 years ago

@asim I think I found the problem, go mod tidy will include test dependencies, but go build will not. I delete my go.mod and go.sum files, and rerun go mod init and go build. No new reference is added any more.

xpunch commented 5 years ago

But I don't know how to track github.com/SAP/go-hdb is dependent by which test file.