Skip to content

x/tools/gopls/internal/cache: TestZeroConfigAlgorithm/basic_GOPATH_workspace failed in my ubuntu  #70196

@xieyuschen

Description

@xieyuschen

Go version

gotip

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/xieyuschen/.cache/go-build'
GOENV='/home/xieyuschen/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/xieyuschen/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/xieyuschen/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn,direct'
GOROOT='/home/xieyuschen/sdk/gotip'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/xieyuschen/sdk/gotip/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.24-8cd550a Fri Sep 6 13:49:31 2024 +0000'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/xieyuschen/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/xieyuschen/codespace/go-tools/gopls/go.mod'
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-build4024255374=/tmp/go-build -gno-record-gcc-switches'

What did you do?

$ git clone git@github.com:golang/tools.git --depth 1 && cd tools
$ git rev-parse HEAD
27e1a3a221b2f5da3ea02dc9bb70c6b71c787551
$ uname -a
Linux xieyuschen 6.8.0-48-generic #48~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC 
Mon Oct  7 11:24:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ cd gopls
$ gotip clean --testcache && gotip test ./internal/cache -run=TestZeroConfigAlgorithm -v

What did you see happen?

=== RUN   TestZeroConfigAlgorithm/basic_GOPATH_workspace
    session_test.go:373: selectViews() mismatch (-want +got):
          []cache.viewSummary{
          	{
        - 		Type: s"GOPATH",
        + 		Type: s"AdHoc",
          		Root: "src",
          		Env:  nil,
          	},
        + 	{Type: s"AdHoc", Root: "src/golang.org/a"},
        + 	{Type: s"AdHoc", Root: "src/golang.org/b"},
          }

What did you expect to see?

The test should pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions