Skip to content
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

cmd/go: go get errors in GOPATH mode #63932

Closed
mvasi90 opened this issue Nov 3, 2023 · 2 comments
Closed

cmd/go: go get errors in GOPATH mode #63932

mvasi90 opened this issue Nov 3, 2023 · 2 comments

Comments

@mvasi90
Copy link

mvasi90 commented Nov 3, 2023

go get / go get -u all always returns errors. I don't remember a single time when go get has worked.

Since the modules appeared in golang, I am migrating to Rust. There is more privacy and more performance, and fewer bugs.
Unfortunately I still have some projects that depend on golang, and they are making my life impossible.

I want to clarify that here I am reporting the go get -u errors.
I am updating the dependencies because when updating the system (archlinux and also gentoo) the web server stops responding to client requests. This is the problem I am trying to solve, I want to find out what is the origin (maybe some braking change that affects the TLS and certificates). For that I need all the dependencies updated.

What version of Go are you using (go version)?

$ go version
go version go1.21.3 linux/amd64

Does this issue reproduce with the latest release?

Yes. All the go releases.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE='off'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home//.cache/go-build'
GOENV='/home//.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home//go/pkg/mod'
GONOPROXY='on'
GONOSUMDB='on'
GOOS='linux'
GOPATH='/home//go'
GOPRIVATE=''
GOPROXY='direct'
GOROOT='/usr/lib/go'
GOSUMDB='off'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD=''
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3345870637=/tmp/go-build -gno-record-gcc-switches'

What did you do?

go get -u all

What did you expect to see?

All dependencies updated.

What did you see instead?

go get -u all output
# cd /home//go/src/google.golang.org/api; git pull --ff-only
From https://github.com/googleapis/google-api-go-client
   590733c415..8bfbeaca4c  main                -> origin/main
 * [new branch]            quartzmo-vet-go-120 -> origin/quartzmo-vet-go-120
 + 515ba43be7...07b9b40c21 release-please--branches--main -> origin/release-please--branches--main  (forced update)
 * [new tag]               v0.100.0            -> v0.100.0
 * [new tag]               v0.101.0            -> v0.101.0
 * [new tag]               v0.102.0            -> v0.102.0
 * [new tag]               v0.103.0            -> v0.103.0
 * [new tag]               v0.104.0            -> v0.104.0
 * [new tag]               v0.105.0            -> v0.105.0
 * [new tag]               v0.106.0            -> v0.106.0
 * [new tag]               v0.107.0            -> v0.107.0
 * [new tag]               v0.108.0            -> v0.108.0
 * [new tag]               v0.109.0            -> v0.109.0
 * [new tag]               v0.110.0            -> v0.110.0
 * [new tag]               v0.111.0            -> v0.111.0
 * [new tag]               v0.112.0            -> v0.112.0
 * [new tag]               v0.113.0            -> v0.113.0
 * [new tag]               v0.114.0            -> v0.114.0
 * [new tag]               v0.115.0            -> v0.115.0
 * [new tag]               v0.116.0            -> v0.116.0
 * [new tag]               v0.117.0            -> v0.117.0
 * [new tag]               v0.118.0            -> v0.118.0
 * [new tag]               v0.119.0            -> v0.119.0
 * [new tag]               v0.120.0            -> v0.120.0
 * [new tag]               v0.121.0            -> v0.121.0
 * [new tag]               v0.122.0            -> v0.122.0
 * [new tag]               v0.123.0            -> v0.123.0
 * [new tag]               v0.124.0            -> v0.124.0
 * [new tag]               v0.125.0            -> v0.125.0
 * [new tag]               v0.126.0            -> v0.126.0
 * [new tag]               v0.127.0            -> v0.127.0
 * [new tag]               v0.128.0            -> v0.128.0
 * [new tag]               v0.129.0            -> v0.129.0
 * [new tag]               v0.130.0            -> v0.130.0
 * [new tag]               v0.131.0            -> v0.131.0
 * [new tag]               v0.132.0            -> v0.132.0
 * [new tag]               v0.133.0            -> v0.133.0
 * [new tag]               v0.134.0            -> v0.134.0
 * [new tag]               v0.135.0            -> v0.135.0
 * [new tag]               v0.136.0            -> v0.136.0
 * [new tag]               v0.137.0            -> v0.137.0
 * [new tag]               v0.138.0            -> v0.138.0
 * [new tag]               v0.139.0            -> v0.139.0
 * [new tag]               v0.140.0            -> v0.140.0
 * [new tag]               v0.141.0            -> v0.141.0
 * [new tag]               v0.142.0            -> v0.142.0
 * [new tag]               v0.143.0            -> v0.143.0
 * [new tag]               v0.144.0            -> v0.144.0
 * [new tag]               v0.145.0            -> v0.145.0
 * [new tag]               v0.146.0            -> v0.146.0
 * [new tag]               v0.147.0            -> v0.147.0
 * [new tag]               v0.148.0            -> v0.148.0
 * [new tag]               v0.149.0            -> v0.149.0
 * [new tag]               v0.84.0             -> v0.84.0
 * [new tag]               v0.85.0             -> v0.85.0
 * [new tag]               v0.86.0             -> v0.86.0
 * [new tag]               v0.87.0             -> v0.87.0
 * [new tag]               v0.88.0             -> v0.88.0
 * [new tag]               v0.89.0             -> v0.89.0
 * [new tag]               v0.90.0             -> v0.90.0
 * [new tag]               v0.91.0             -> v0.91.0
 * [new tag]               v0.92.0             -> v0.92.0
 * [new tag]               v0.93.0             -> v0.93.0
 * [new tag]               v0.94.0             -> v0.94.0
 * [new tag]               v0.95.0             -> v0.95.0
 * [new tag]               v0.96.0             -> v0.96.0
 * [new tag]               v0.97.0             -> v0.97.0
 * [new tag]               v0.98.0             -> v0.98.0
 * [new tag]               v0.99.0             -> v0.99.0
error: Your local changes to the following files would be overwritten by merge:
	transport/http/dial.go
Please commit your changes or stash them before you merge.
Aborting
package google.golang.org/api/googleapi: exit status 1
cannot find package "github.com/apache/arrow/go/v12/arrow" in any of:
	/usr/lib/go/src/github.com/apache/arrow/go/v12/arrow (from $GOROOT)
	/home//go/src/github.com/apache/arrow/go/v12/arrow (from $GOPATH)
cannot find package "github.com/apache/arrow/go/v12/arrow/array" in any of:
	/usr/lib/go/src/github.com/apache/arrow/go/v12/arrow/array (from $GOROOT)
	/home//go/src/github.com/apache/arrow/go/v12/arrow/array (from $GOPATH)
cannot find package "github.com/apache/arrow/go/v12/arrow/ipc" in any of:
	/usr/lib/go/src/github.com/apache/arrow/go/v12/arrow/ipc (from $GOROOT)
	/home//go/src/github.com/apache/arrow/go/v12/arrow/ipc (from $GOPATH)
cannot find package "github.com/apache/arrow/go/v12/arrow/memory" in any of:
	/usr/lib/go/src/github.com/apache/arrow/go/v12/arrow/memory (from $GOROOT)
	/home//go/src/github.com/apache/arrow/go/v12/arrow/memory (from $GOPATH)
cannot find package "cloud.google.com/go/bigquery/reservation/apiv1beta1" in any of:
	/usr/lib/go/src/cloud.google.com/go/bigquery/reservation/apiv1beta1 (from $GOROOT)
	/home//go/src/cloud.google.com/go/bigquery/reservation/apiv1beta1 (from $GOPATH)
cannot find package "cloud.google.com/go/bigtable/cmd/loadtest" in any of:
	/usr/lib/go/src/cloud.google.com/go/bigtable/cmd/loadtest (from $GOROOT)
	/home//go/src/cloud.google.com/go/bigtable/cmd/loadtest (from $GOPATH)
cannot find package "cloud.google.com/go/bigtable/cmd/scantest" in any of:
	/usr/lib/go/src/cloud.google.com/go/bigtable/cmd/scantest (from $GOROOT)
	/home//go/src/cloud.google.com/go/bigtable/cmd/scantest (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/breakpoints (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/controller (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/arch" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/arch (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/arch (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/cmd/debugproxy" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/cmd/debugproxy (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/cmd/debugproxy (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/dwarf" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/dwarf (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/dwarf (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/elf" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/elf (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/elf (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/gosym (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/local" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/local (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/local (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/remote" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/remote (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/remote (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server/protocol" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server/protocol (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/server/protocol (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/tests/peek" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/tests/peek (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/debug/tests/peek (from $GOPATH)
cannot find package "cloud.google.com/go/cmd/go-cloud-debug-agent/internal/valuecollector" in any of:
	/usr/lib/go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/valuecollector (from $GOROOT)
	/home//go/src/cloud.google.com/go/cmd/go-cloud-debug-agent/internal/valuecollector (from $GOPATH)
code in directory /home//go/src/cloud.google.com/go/dataproc/apiv1 expects import "cloud.google.com/go/dataproc/v2/apiv1"
cannot find package "cloud.google.com/go/firestore/apiv1beta1" in any of:
	/usr/lib/go/src/cloud.google.com/go/firestore/apiv1beta1 (from $GOROOT)
	/home//go/src/cloud.google.com/go/firestore/apiv1beta1 (from $GOPATH)
cannot find package "cloud.google.com/go/gaming/apiv1" in any of:
	/usr/lib/go/src/cloud.google.com/go/gaming/apiv1 (from $GOROOT)
	/home//go/src/cloud.google.com/go/gaming/apiv1 (from $GOPATH)
cannot find package "cloud.google.com/go/gaming/apiv1beta" in any of:
	/usr/lib/go/src/cloud.google.com/go/gaming/apiv1beta (from $GOROOT)
	/home//go/src/cloud.google.com/go/gaming/apiv1beta (from $GOPATH)
cannot find package "cloud.google.com/go/gaming/internal" in any of:
	/usr/lib/go/src/cloud.google.com/go/gaming/internal (from $GOROOT)
	/home//go/src/cloud.google.com/go/gaming/internal (from $GOPATH)
cannot find package "cloud.google.com/go/internal/apidiff" in any of:
	/usr/lib/go/src/cloud.google.com/go/internal/apidiff (from $GOROOT)
	/home//go/src/cloud.google.com/go/internal/apidiff (from $GOPATH)
cannot find package "github.com/google/go-github/v52/github" in any of:
	/usr/lib/go/src/github.com/google/go-github/v52/github (from $GOROOT)
	/home//go/src/github.com/google/go-github/v52/github (from $GOPATH)
cannot find package "cloud.google.com/go/internal/gapicgen/cmd/gensnippets" in any of:
	/usr/lib/go/src/cloud.google.com/go/internal/gapicgen/cmd/gensnippets (from $GOROOT)
	/home//go/src/cloud.google.com/go/internal/gapicgen/cmd/gensnippets (from $GOPATH)
cannot find package "cloud.google.com/go/internal/gapicgen/gensnippets" in any of:
	/usr/lib/go/src/cloud.google.com/go/internal/gapicgen/gensnippets (from $GOROOT)
	/home//go/src/cloud.google.com/go/internal/gapicgen/gensnippets (from $GOPATH)
cannot find package "cloud.google.com/go/internal/gapicgen/gensnippets/metadata" in any of:
	/usr/lib/go/src/cloud.google.com/go/internal/gapicgen/gensnippets/metadata (from $GOROOT)
	/home//go/src/cloud.google.com/go/internal/gapicgen/gensnippets/metadata (from $GOPATH)
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink?go-get=1: 404 Not Found
package cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink: unrecognized import path "cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink": reading https://cloud.google.com/go/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink?go-get=1: 404 Not Found

[...]
Cut by limit in github:
There was an error creating your Issue: body is too long (maximum is 65536 characters).
[...]

/usr/lib/go/src/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/sort/go (from $GOROOT)
/home/<user>/go/src/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/sort/go (from $GOPATH)

cannot find package "github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/yet_another_package/go" in any of:
/usr/lib/go/src/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/yet_another_package/go (from $GOROOT)
/home//go/src/github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/yet_another_package/go (from $GOPATH)
package github.com/envoyproxy/protoc-gen-validate/tests/harness/go: no Go files in /home//go/src/github.com/envoyproxy/protoc-gen-validate/tests/harness/go
cannot find package "github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns" in any of:
/usr/lib/go/src/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns (from $GOROOT)
/home//go/src/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns (from $GOPATH)
cannot find package "github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns" in any of:
/usr/lib/go/src/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns (from $GOROOT)
/home//go/src/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns (from $GOPATH)
cannot find package "github.com/golang-jwt/jwt/v4" in any of:
/usr/lib/go/src/github.com/golang-jwt/jwt/v4 (from $GOROOT)
/home//go/src/github.com/golang-jwt/jwt/v4 (from $GOPATH)
cannot find package "github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2" in any of:
/usr/lib/go/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2 (from $GOROOT)
/home//go/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2 (from $GOPATH)
cannot find package "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" in any of:
/usr/lib/go/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid (from $GOROOT)
/home//go/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid (from $GOPATH)
cannot find package "google.golang.org/api/acmedns/v1" in any of:
/usr/lib/go/src/google.golang.org/api/acmedns/v1 (from $GOROOT)
/home//go/src/google.golang.org/api/acmedns/v1 (from $GOPATH)
cannot find package "github.com/vultr/govultr/v2" in any of:
/usr/lib/go/src/github.com/vultr/govultr/v2 (from $GOROOT)
/home//go/src/github.com/vultr/govultr/v2 (from $GOPATH)
cannot find package "github.com/urfave/cli/v2" in any of:
/usr/lib/go/src/github.com/urfave/cli/v2 (from $GOROOT)
/home//go/src/github.com/urfave/cli/v2 (from $GOPATH)
cannot find package "github.com/google/go-github/v56/github" in any of:
/usr/lib/go/src/github.com/google/go-github/v56/github (from $GOROOT)
/home//go/src/github.com/google/go-github/v56/github (from $GOPATH)
package github.com/shurcooL/graphql/example/graphqldev: build constraints exclude all Go files in /home//go/src/github.com/shurcooL/graphql/example/graphqldev
cannot find package "golang.org/x/sys/internal/unsafeheader" in any of:
/usr/lib/go/src/golang.org/x/sys/internal/unsafeheader (from $GOROOT)
/home//go/src/golang.org/x/sys/internal/unsafeheader (from $GOPATH)
cannot find package "golang.org/x/tools/go/pointer" in any of:
/usr/lib/go/src/golang.org/x/tools/go/pointer (from $GOROOT)
/home//go/src/golang.org/x/tools/go/pointer (from $GOPATH)
cannot find package "golang.org/x/tools/go/vcs" in any of:
/usr/lib/go/src/golang.org/x/tools/go/vcs (from $GOROOT)
/home//go/src/golang.org/x/tools/go/vcs (from $GOPATH)
cannot find package "golang.org/x/tools/gopls/internal/govulncheck" in any of:
/usr/lib/go/src/golang.org/x/tools/gopls/internal/govulncheck (from $GOROOT)
/home//go/src/golang.org/x/tools/gopls/internal/govulncheck (from $GOPATH)
cannot find package "golang.org/x/tools/gopls/internal/govulncheck/semver" in any of:
/usr/lib/go/src/golang.org/x/tools/gopls/internal/govulncheck/semver (from $GOROOT)
/home//go/src/golang.org/x/tools/gopls/internal/govulncheck/semver (from $GOPATH)
cannot find package "golang.org/x/tools/internal/bug" in any of:
/usr/lib/go/src/golang.org/x/tools/internal/bug (from $GOROOT)
/home//go/src/golang.org/x/tools/internal/bug (from $GOPATH)
cannot find package "golang.org/x/tools/internal/fastwalk" in any of:
/usr/lib/go/src/golang.org/x/tools/internal/fastwalk (from $GOROOT)
/home//go/src/golang.org/x/tools/internal/fastwalk (from $GOPATH)
cannot find package "golang.org/x/tools/internal/lockedfile" in any of:
/usr/lib/go/src/golang.org/x/tools/internal/lockedfile (from $GOROOT)
/home//go/src/golang.org/x/tools/internal/lockedfile (from $GOPATH)
cannot find package "golang.org/x/tools/internal/lockedfile/internal/filelock" in any of:
/usr/lib/go/src/golang.org/x/tools/internal/lockedfile/internal/filelock (from $GOROOT)
/home//go/src/golang.org/x/tools/internal/lockedfile/internal/filelock (from $GOPATH)
cannot find package "github.com/google/go-github/v42/github" in any of:
/usr/lib/go/src/github.com/google/go-github/v42/github (from $GOROOT)
/home//go/src/github.com/google/go-github/v42/github (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/gaming/allocationendpoint/v1alpha" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/gaming/allocationendpoint/v1alpha (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/gaming/allocationendpoint/v1alpha (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/gaming/v1" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/gaming/v1 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/gaming/v1 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/gaming/v1beta" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/gaming/v1beta (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/gaming/v1beta (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/irm/v1alpha2" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/irm/v1alpha2 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/irm/v1alpha2 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/secretmanager/v1beta1 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/secrets/v1beta1" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/secrets/v1beta1 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/secrets/v1beta1 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1 (from $GOPATH)
cannot find package "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2" in any of:
/usr/lib/go/src/google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2 (from $GOROOT)
/home//go/src/google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2 (from $GOPATH)
cannot find package "google.golang.org/grpc/examples/features/errors/client" in any of:
/usr/lib/go/src/google.golang.org/grpc/examples/features/errors/client (from $GOROOT)
/home//go/src/google.golang.org/grpc/examples/features/errors/client (from $GOPATH)
cannot find package "google.golang.org/grpc/examples/features/errors/server" in any of:
/usr/lib/go/src/google.golang.org/grpc/examples/features/errors/server (from $GOROOT)
/home//go/src/google.golang.org/grpc/examples/features/errors/server (from $GOPATH)
cannot find package "google.golang.org/grpc/gcp/observability/internal/config" in any of:
/usr/lib/go/src/google.golang.org/grpc/gcp/observability/internal/config (from $GOROOT)
/home//go/src/google.golang.org/grpc/gcp/observability/internal/config (from $GOPATH)
cannot find package "google.golang.org/grpc/gcp/observability/internal/logging" in any of:
/usr/lib/go/src/google.golang.org/grpc/gcp/observability/internal/logging (from $GOROOT)
/home//go/src/google.golang.org/grpc/gcp/observability/internal/logging (from $GOPATH)
cannot find package "google.golang.org/grpc/internal/proto/grpc_service_config" in any of:
/usr/lib/go/src/google.golang.org/grpc/internal/proto/grpc_service_config (from $GOROOT)
/home//go/src/google.golang.org/grpc/internal/proto/grpc_service_config (from $GOPATH)
package google.golang.org/grpc/internal/xds: no Go files in /home//go/src/google.golang.org/grpc/internal/xds
cannot find package "google.golang.org/grpc/test/grpc_testing" in any of:
/usr/lib/go/src/google.golang.org/grpc/test/grpc_testing (from $GOROOT)
/home//go/src/google.golang.org/grpc/test/grpc_testing (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/balancer/orca" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/balancer/orca (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/balancer/orca (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/testutils/fakeserver" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/testutils/fakeserver (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/testutils/fakeserver (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/xdsclient/controller" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/xdsclient/controller (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/xdsclient/controller (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/xdsclient/controller/version" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2 (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2 (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3 (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3 (from $GOPATH)
cannot find package "google.golang.org/grpc/xds/internal/xdsclient/pubsub" in any of:
/usr/lib/go/src/google.golang.org/grpc/xds/internal/xdsclient/pubsub (from $GOROOT)
/home//go/src/google.golang.org/grpc/xds/internal/xdsclient/pubsub (from $GOPATH)
package -v: -v: invalid import path: malformed import path "-v": leading dash

Are the modules mandatory in golang?

@bcmills bcmills added the GoCommand cmd/go label Nov 3, 2023
@bcmills bcmills changed the title go get errors cmd/go: go get errors in GOPATH mode Nov 3, 2023
@bcmills
Copy link
Contributor

bcmills commented Nov 3, 2023

Are the modules mandatory in golang?

Per #60915, go build and go test should continue to work in GOPATH mode for the foreseeable future, but go get will no longer be supported as of Go 1.22. Given that, we don't plan to fix existing bugs in Go 1.21 and earlier unless they are severe regressions introduced in a currently-supported release (Go 1.20 or Go 1.21).

Many packages in the Go ecosystem do already require the use of modules. google.golang.org/api/googleapi may be one of them.

Note also that go get is reporting an error due to a local change in your copy of github.com/googleapis/google-api-go-client:

error: Your local changes to the following files would be overwritten by merge:
	transport/http/dial.go
Please commit your changes or stash them before you merge.

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
@mvasi90
Copy link
Author

mvasi90 commented Nov 3, 2023

For me, the first warning is not an error per se. It is a git warning because I removed all the telemetry code that tracks: go.opencensus.io/trace, from google.golang.org/api/transport/http/dial.go and google.golang.org/api/transport/http/internal/propagation/http.go.

Out of scope criticism

Most users are unaware of the fact that the official google libraries incorporate telemetry. More than one will be defensive, saying that the code is not active. If you inspect your compiled binary with strings, gdb or radare2 , you will see code that tracks (regardless of whether it is active or not, and who manages it, and where the end-user's data gets to). This is very very ugly from a privacy point of view.

Over time Google is leaving less and less freedom to the developer. It has been seen with the private key of Android apps, now the developer is forced to give them to Google.

It has been seen with the kotlin language strategy that atrophies the programmer's brain. Google does everything for you, you fool not to know how to do anything. Easy code.

kotlin is still java, the only difference is that the programmer is further away from the machine. He does things without knowing how it works at a low level. And he is free to choose between Java in disuse without documentation or Kotlin with everything on a platter.

It goes something like this: Dear developer, if you have some conscience and perceive that there is a lack of privacy when using Golang modules and Google proxies, you are free to disable them. The only thing is that you won't be able to use any more dependencies nor will there be support for you to update anything. As developer, you won't survive for long.

In other words: Dear woman, you are free not to wear the hijab/niqab/burqa on your head, but you won't surv...

As far as I am concerned, this can be closed. I am abandoning everything that belongs to Google. If I liked dictatorship, being controlled, monitored and tracked, I would go live in North Korea. (Take a look at Google Takeout and you will understand what I am saying).

@golang golang locked and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants