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

x/text/cmd/gotext: update dependency on x/tools #58737

Closed
lostsnow opened this issue Feb 26, 2023 · 4 comments
Closed

x/text/cmd/gotext: update dependency on x/tools #58737

lostsnow opened this issue Feb 26, 2023 · 4 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@lostsnow
Copy link

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

$ go version
go version go1.20.1 linux/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
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/lostsnow/.cache/go-build"
GOENV="/home/lostsnow/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/lostsnow/projects/golang/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/lostsnow/projects/golang"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/lib/go-1.20"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.20/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/lostsnow/projects/github/lostsnow/keqing/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 -fdebug-prefix-map=/tmp/go-build476965899=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go install golang.org/x/text/cmd/gotext@master
go: downloading golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b
$ gotext -srclang=en-US update -out=catalog.go -lang=en-US,zh-Hans           

What did you expect to see?

update translations and generate catalog successfully

What did you see instead?

panic: in net/netip.AddrFromSlice: cannot convert *t0 ([]byte) to [4]byte

goroutine 2763 [running]:
golang.org/x/tools/go/ssa.emitConv(0xc01e6a24e0, {0x906318, 0xc02f4c9620}, {0x903130?, 0xc0248a0288})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/emit.go:251 +0x90e
golang.org/x/tools/go/ssa.(*builder).expr0(0xc01c67de18, 0xc01e6a24e0, {0x903c80?, 0xc01d899e80?}, {0x7, {0x903130, 0xc0248a0288}, {0x0, 0x0}})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:661 +0x765
golang.org/x/tools/go/ssa.(*builder).expr(0xc01d89d420?, 0xc01e6a24e0, {0x903c80, 0xc01d899e80})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:610 +0x187
golang.org/x/tools/go/ssa.(*builder).emitCallArgs(0xc01e6a24e0?, 0xc01e6a24e0, 0xc0244d5b80, 0xc01d899ec0, {0x0?, 0x0, 0xc01c67d128?})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:1030 +0x125
golang.org/x/tools/go/ssa.(*builder).setCall(0x7f5aa0?, 0xc01ce706c0?, 0xc01d899ec0, 0xc00adfd9c0)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:1092 +0x91
golang.org/x/tools/go/ssa.(*builder).expr0(0xc01c67de18, 0xc01e6a24e0, {0x903c80?, 0xc01d899ec0?}, {0x7, {0x9031f8, 0xc0243cfb90}, {0x0, 0x0}})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:686 +0x24e5
golang.org/x/tools/go/ssa.(*builder).expr(0x430c08?, 0xc01e6a24e0, {0x903c80, 0xc01d899ec0})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:610 +0x187
golang.org/x/tools/go/ssa.(*builder).stmt(0xc01e6a24e0?, 0xc01e6a24e0, {0x9041c0?, 0xc01d89d4e0?})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2161 +0x117b
golang.org/x/tools/go/ssa.(*builder).stmtList(...)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:911
golang.org/x/tools/go/ssa.(*builder).switchStmt(0x41862d?, 0xc01e6a24e0, 0xc01d89b170, 0x0)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:1421 +0xd37
golang.org/x/tools/go/ssa.(*builder).stmt(0xc01c67d978?, 0xc01e6a24e0, {0x904310?, 0xc01d89b170?})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2244 +0xe65
golang.org/x/tools/go/ssa.(*builder).stmtList(0xc02f4c9560?, 0x10?, {0xc01d89d6a0?, 0x2, 0x40f128?})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:911 +0x45
golang.org/x/tools/go/ssa.(*builder).stmt(0xc01e6a24e0?, 0xc01e6a24e0, {0x903c20?, 0xc01d89b1a0?})
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2218 +0x8d9
golang.org/x/tools/go/ssa.(*builder).buildFunctionBody(0x673211?, 0xc01e6a24e0)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2327 +0x405
golang.org/x/tools/go/ssa.(*builder).buildFunction(0x673260?, 0xc01e6a24e0)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2267 +0x2e
golang.org/x/tools/go/ssa.(*builder).buildCreated(0xc01c67de18)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2349 +0x25
golang.org/x/tools/go/ssa.(*Package).build(0xc003187880)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2529 +0xc66
sync.(*Once).doSlow(0x20666c6573746920?, 0x7961776c61207369?)
        /usr/lib/go-1.20/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/lib/go-1.20/src/sync/once.go:65
golang.org/x/tools/go/ssa.(*Package).Build(...)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2413
golang.org/x/tools/go/ssa.(*Program).Build.func1(0x2f2f090a68746977?)
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2398 +0x4c
created by golang.org/x/tools/go/ssa.(*Program).Build
        /home/lostsnow/projects/golang/pkg/mod/golang.org/x/tools@v0.1.12/go/ssa/builder.go:2397 +0x19c
@lostsnow lostsnow reopened this Feb 26, 2023
@seankhliao seankhliao changed the title gotext update panic: in net/netip.AddrFromSlice: cannot convert *t0 ([]byte) to [4]byte x/text/cmd/gotext: update dependency on x/tools Feb 26, 2023
@gopherbot gopherbot added this to the Unreleased milestone Feb 26, 2023
@seankhliao
Copy link
Member

it should probably use the latest version of x/tools (updated for 1.20) rather than one from over half a year ago.

see also #56530

cc @golang/release ?

@gopherbot
Copy link

Change https://go.dev/cl/471399 mentions this issue: go.mod: update to newer x/tools

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 27, 2023
@heschi
Copy link
Contributor

heschi commented Feb 27, 2023

The tagging process ignores this dependency because it's part of a dependency cycle. I suppose updating to a recent version that's going to be immediately out of date might be better than leaving it stale forever, but I think I'd rather wait and see if this becomes a problem again before working on it.

@gopherbot
Copy link

Change https://go.dev/cl/501835 mentions this issue: go.mod: delete repeated "indirect"

gopherbot pushed a commit to golang/text that referenced this issue Jun 8, 2023
It got added by 'go mod tidy' in CL 471399
because the '; ' separator was missing.

For golang/go#48523.
For golang/go#58737.

Change-Id: I63642a4f49beb9679f9c5bbb4e2aa8ed0cc73c9e
Reviewed-on: https://go-review.googlesource.com/c/text/+/501835
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants