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/compile: rewrite cycle detected #52344

Closed
tsingsun opened this issue Apr 14, 2022 · 2 comments
Closed

cmd/compile: rewrite cycle detected #52344

tsingsun opened this issue Apr 14, 2022 · 2 comments
Labels
NeedsInvestigation
Milestone

Comments

@tsingsun
Copy link

@tsingsun tsingsun commented Apr 14, 2022

I use facebook ent and golang 1.18, i write to the problem to the ent site. detail

Starting: [/Users/tsingsun/go/bin/dlv]() dap --check-go-version=false --listen=127.0.0.1:57334 --log-dest=3 from [/Users/tsingsun/workspace/project/datacenter/indicator/cmd/web]()
DAP server listening at: 127.0.0.1:57334
Build Error: go build -o [/Users/tsingsun/workspace/project/datacenter/indicator/cmd/web/__debug_bin]() -gcflags all=-N -l .
# t.qeelyn.com[/datacenter/indicator/ent]()
.[./../ent/gql_where_input.go:2019:14](): internal compiler error: '(*FinBalanceSheetWhereInput).P': rewrite cycle detected

Please file a bug report including a short program that triggers the error.
[https://go.dev/issue/new]() (exit status 2)

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

yes

$ go version

go version go1.18.1 darwin/amd64

Does this issue reproduce with the latest release?

reproduce repository : https://github.com/tsingsun/ent-issue-2472.git

in vscode locate server/server.go and F5 run will see the problem.

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

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tsingsun/Library/Caches/go-build"
GOENV="/Users/tsingsun/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE="120.77.219.247,t.qeelyn.com"
GOMODCACHE="/Users/tsingsun/go/pkg/mod"
GONOPROXY="120.77.219.247,t.qeelyn.com"
GONOSUMDB="120.77.219.247,t.qeelyn.com"
GOOS="darwin"
GOPATH="/Users/tsingsun/go"
GOPRIVATE="120.77.219.247,t.qeelyn.com"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/Cellar/go/1.18.1/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.1/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m0/g43_080j7_z7dnn357spm1v40000gn/T/go-build1211276890=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Use Run Build go build -o ./cmd/web/serve-darwin ./cmd/web/main.go the programe RUN good.

  2. Use Debug Build go build -o -gcflags all=-N -l got compile error:

  3. the other project with less shemas and smaller gql_where_input . RUN and DEBUG are good

4.go 1.17 all is ok

What did you expect to see?

go build -o -gcflags all=-N -l is ok

What did you see instead?

go build -o -gcflags all=-N -l is error

@seankhliao seankhliao changed the title cmd/gobuild: got a rewrite cycle detected cmd/compile: rewrite cycle detected Apr 14, 2022
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Apr 14, 2022

CC @randall77

@ianlancetaylor ianlancetaylor added the NeedsInvestigation label Apr 14, 2022
@ianlancetaylor ianlancetaylor added this to the Go1.19 milestone Apr 14, 2022
@randall77
Copy link
Contributor

@randall77 randall77 commented Apr 15, 2022

Ok, I can reproduce. I think this is just #51639. For some reason that issue didn't get requested for a backport to 1.18, I'll do that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

3 participants