Skip to content

cmd/compile: rewrite cycle detected #52344

@tsingsun

Description

@tsingsun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions