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/internal/moddeps: if GOROOT is symbol link output findGorootModules didn't find the well-known module "std" #64375

Closed
qiulaidongfeng opened this issue Nov 24, 2023 · 1 comment
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@qiulaidongfeng
Copy link
Contributor

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

$ go version
go version devel go1.22-0c7e5d3b Thu Nov 23 17:33:57 2023 +0000 windows/amd64

Does this issue reproduce with the latest release?

yes.

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

go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=D:\tmp\go-build
set GOENV=C:\Users\26454\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\file\gofile\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\file\gofile
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Users\26454\gotip
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=local
set GOTOOLDIR=C:\Users\26454\gotip\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.22-0c7e5d3b Thu Nov 23 17:33:57 2023 +0000
set GCCGO=gccgo
set GOAMD64=v3
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\26454\gotip\src\go.mod
set GOWORK=off
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\26454\AppData\Local\Temp\go-build339426779=/tmp/go-build -gno-record-gcc-switches
GOROOT/bin/go version: go version devel go1.22-0c7e5d3b Thu Nov 23 17:33:57 2023 +0000 windows/amd64
GOROOT/bin/go tool compile -V: compile version devel go1.22-0c7e5d3b Thu Nov 23 17:33:57 2023 +0000
lldb --version: lldb version 14.0.6

What did you do?

GOROOT is symbol link

go test cmd/internal/moddeps

What did you expect to see?

test pass.

What did you see instead?

--- FAIL: TestAllDependencies (0.19s)
moddeps_test.go:49: findGorootModules didn't find the well-known module "std"
--- FAIL: TestDependencyVersionsConsistent (0.00s)
moddeps_test.go:358: findGorootModules didn't find the well-known module "std"
FAIL
FAIL cmd/internal/moddeps 1.630s

qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Nov 24, 2023
…ind "std"

if GOROOT is symbol link output
findGorootModules didn't find the well-known module "std"
now avoid test failures by handling GOROOT
using os.Readlink when testing if GOROOT is a symbolic link.

Fixes golang#64375
@gopherbot
Copy link

Change https://go.dev/cl/544757 mentions this issue: cmd/internal/moddeps,internal/testenv: fix findGorootModules didn't find "std"

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed FixPending Issues that have a fix which has not yet been reviewed or submitted. labels Nov 27, 2023
@bcmills bcmills added this to the Backlog milestone Nov 27, 2023
@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Nov 27, 2023
@bcmills bcmills added FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. labels Nov 27, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 27, 2023
@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Nov 27, 2023
@dmitshur dmitshur modified the milestones: Backlog, Go1.22 Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants