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

go get -v github.com/pingcap/tidb/pkg/parser@069631e doesn't work in go 1.20.2 #49099

Closed
tsfans opened this issue Dec 1, 2023 · 3 comments
Closed
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@tsfans
Copy link

tsfans commented Dec 1, 2023

Enhancement

I am trying use sql parser by follow parser quickstart
this guide works fine in v5.3.0, didn't work in latest version v7.5.0

PS: cmp&slices seems like been add in go 1.21, but go version in parser's go.mod is 1.18, How does this work?

1. Minimal reproduce step (Required)

mkdir colx
cd colx
go mod init colx
touch main.go
go get -v github.com/pingcap/tidb/pkg/parser@069631e

get this error

github.com/pingcap/tidb/pkg/parser imports
        github.com/pingcap/tidb/pkg/parser/charset imports
        cmp: package cmp is not in GOROOT (/usr/local/go/src/cmp)
github.com/pingcap/tidb/pkg/parser imports
        github.com/pingcap/tidb/pkg/parser/charset imports
        slices: package slices is not in GOROOT (/usr/local/go/src/slices)

go version & env

go version go1.20.2 linux/amd64

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY="gitlab.zixel.cn"
GONOSUMDB="gitlab.zixel.cn"
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE="gitlab.zixel.cn"
GOPROXY="proxy.golang.com.cn"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/workspace/github/colx/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-build651513859=/tmp/go-build -gno-record-gcc-switches"
@tsfans tsfans added the type/enhancement The issue or PR belongs to an enhancement. label Dec 1, 2023
@hawkingrei
Copy link
Member

It has been fixed by #48254.

@hawkingrei hawkingrei added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/moderate and removed type/enhancement The issue or PR belongs to an enhancement. labels Dec 1, 2023
@tsfans
Copy link
Author

tsfans commented Dec 4, 2023

It has been fixed by #48254.

This won't work in v7.5.0 even you fix master code, maybe we sholud revert parser quickstart to v5.3.0 before release new version.

@cheneyxwong
Copy link

How can I get this fix? Seems that it has not been released yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants