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

import/path: issue title #70159

Closed
berryk-sunlife opened this issue Nov 1, 2024 · 8 comments
Closed

import/path: issue title #70159

berryk-sunlife opened this issue Nov 1, 2024 · 8 comments

Comments

@berryk-sunlife
Copy link

Go version

https://go.dev/dl/go1.23.2.linux-amd64.tar.gz

Output of go env in your module/workspace:

11:56:47 go env
11:56:47 GO111MODULE=''
11:56:47 GOARCH='amd64'
11:56:47 GOBIN=''
11:56:47 GOCACHE='/opt/cloudbees/jenkins/.cache/go-build'
11:56:47 GOENV='/opt/cloudbees/jenkins/.config/go/env'
11:56:47 GOEXE=''
11:56:47 GOEXPERIMENT=''
11:56:47 GOFLAGS=''
11:56:47 GOHOSTARCH='amd64'
11:56:47 GOHOSTOS='linux'
11:56:47 GOINSECURE=''
11:56:47 GOMODCACHE='/var/cloudbees/application-data/jenkins/workspace/Development/Security-Examples/Hello-World/Go/Build-Hello-World-Go-Watch-Revive@tmp/go/pkg/mod'
11:56:47 GONOPROXY=''
11:56:47 GONOSUMDB=''
11:56:47 GOOS='linux'
11:56:47 GOPATH='/var/cloudbees/application-data/jenkins/workspace/Development/Security-Examples/Hello-World/Go/Build-Hello-World-Go-Watch-Revive@tmp/go'
11:56:47 GOPRIVATE=''
11:56:47 GOPROXY=''
11:56:47 GOROOT='/var/cloudbees/application-data/jenkins/workspace/Development/Security-Examples/Hello-World/Go/Build-Hello-World-Go-Watch-Revive@tmp/usr/local/go'
11:56:47 GOSUMDB=''
11:56:47 GOTMPDIR=''
11:56:47 GOTOOLCHAIN=''
11:56:47 GOTOOLDIR='/var/cloudbees/application-data/jenkins/workspace/Development/Security-Examples/Hello-World/Go/Build-Hello-World-Go-Watch-Revive@tmp/usr/local/go/pkg/tool/linux_amd64'
11:56:47 GOVCS=''
11:56:47 GOVERSION='go1.22.5'
11:56:47 GCCGO='gccgo'
11:56:47 GOAMD64='v1'
11:56:47 AR='ar'
11:56:47 CC='gcc'
11:56:47 CXX='g++'
11:56:47 CGO_ENABLED='0'
11:56:47 GOMOD='/var/cloudbees/application-data/jenkins/workspace/Development/Security-Examples/Hello-World/Go/Build-Hello-World-Go-Watch-Revive/go.mod'
11:56:47 GOWORK=''
11:56:47 CGO_CFLAGS='-O2 -g'
11:56:47 CGO_CPPFLAGS=''
11:56:47 CGO_CXXFLAGS='-O2 -g'
11:56:47 CGO_FFLAGS='-O2 -g'
11:56:47 CGO_LDFLAGS='-O2 -g'
11:56:47 PKG_CONFIG='pkg-config'
11:56:47 GOGCCFLAGS='-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1653639929=/tmp/go-build -gno-record-gcc-switches'

What did you do?

export GOPATH="$WORKSPACE_TMP/go"
export GOPROXY='https://proxy.golang.org,direct'
export GOROOT="$WORKSPACE_TMP/usr/local/go"
export PATH="$PATH:$WORKSPACE_TMP/bin:$GOPATH/bin"

mkdir -p "$WORKSPACE_TMP/bin"
mkdir -p "$GOROOT"
mkdir -p "$GOPATH"
curl -LO https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
tar -C "$GOROOT" -xzf go1.23.2.linux-amd64.tar.gz

go install github.com/kisielk/[email protected]

What did you see happen?

Error
go: github.com/kisielk/[email protected]: GOPROXY list is not the empty string, but contains no entries

What did you expect to see?

No Error

@aep-sunlife
Copy link

aep-sunlife commented Nov 1, 2024

How come the Go 1.23.2 tarball produces a go env that claims GOVERSION "go1.22.5"?

By the way, GOSUMDB is also a blank string out of the box, which go install ... later complains about as well.

@seankhliao
Copy link
Member

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
@aep-sunlife
Copy link

That's why I'm here; to analyze errors and potential bugs, not perform general discussions.

@ianlancetaylor
Copy link
Member

You will get better and faster answers in a forum.

@aep-sunlife
Copy link

The root problem in this case seems to be untarring the Go archive directly into GOROOT, resulting in a corrupted directory structure .../go/go/...

Thereupon Go gets confused and ends up with a kinds of misbehaviors.

Changing the -C value to the parent of the GOROOT directory works much better.

@aep-sunlife
Copy link

You will get better and faster answers in a forum.

If that's the case then disable GitHub issues for this repository. No sense maintaining a forum that users are actively discouraged from using to troubleshoot errors.

@ianlancetaylor
Copy link
Member

We use the issue tracker to track bug reports and proposed changes to the language and library.

We have tried to use it to help people with using Go, but we have found through experience that using a forum works better for the people who are having problems. That is why we wrote https://go.dev/wiki/Questions, and why we direct people there.

There are many millions of Go users, and there is a very small team of Go developers. The most effective way for users to get help is from other users. That is what forums are for.

Thanks for your interest in Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants