Skip to content

cmd/go: packages with non root vendor elements excluded from module #71785

Open
@gucio321

Description

@gucio321

Go version

go version go1.24.0 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/uername/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/uername/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3740879903=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/uername/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/uername/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/uername/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.0'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

In #70303 I was told that the bug that packages with /vendor in its name not being in a root of the module should not produce errors anymore but I've tried to upgrade https://github.com/AllenDang/cimgui-go as well as github.com/allendang/giu to go 1.24 and doing go mod tidy on giu still produces an error

What did you see happen?

go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/named_subexpressions
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/object_cache
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/pathology
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/regress
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/static_mutex
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/test/unicode
go: finding module for package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/tools/generate
go: github.com/AllenDang/giu imports
	github.com/AllenDang/cimgui-go/imgui imports
	github.com/AllenDang/cimgui-go imports
	github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/build: module github.com/AllenDang/cimgui-go@latest found (v1.3.0), but does not contain package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/build
go: github.com/AllenDang/giu imports
	github.com/AllenDang/cimgui-go/imgui imports
	github.com/AllenDang/cimgui-go imports
	github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/example/grep: module github.com/AllenDang/cimgui-go@latest found (v1.3.0), but does not contain package github.com/AllenDang/cimgui-go/cwrappers/ImGuiColorTextEdit/vendor/regex/example/grep
go: github.com/AllenDang/giu imports

What did you expect to see?

no error should happen since this bug is supposed to be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions