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

crd-ref-docs cannot work in golang 1.22 #68

Closed
Xunzhuo opened this issue Mar 7, 2024 · 1 comment
Closed

crd-ref-docs cannot work in golang 1.22 #68

Xunzhuo opened this issue Mar 7, 2024 · 1 comment

Comments

@Xunzhuo
Copy link

Xunzhuo commented Mar 7, 2024

===========> Running docs-api-gen ... 
tools/bin/crd-ref-docs \
--source-path=api/v1alpha1 \
--config=tools/crd-ref-docs/config.yaml \
--templates-dir=tools/crd-ref-docs/templates \
--output-path=site/content/en/latest/api/extension_types.md \
--max-depth 10 \
--renderer=markdown
2024-03-06T04:04:57.860Z	INFO	crd-ref-docs	Loading configuration	{"path": "tools/crd-ref-docs/config.yaml"}
2024-03-06T04:04:57.860Z	INFO	crd-ref-docs	Processing source directory	{"directory": "api/v1alpha1", "depth": 10}
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x641abe]

goroutine 208 [running]:
go/types.(*Checker).handleBailout(0xc00250a000, 0xc000915d40)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:367 +0x88
panic({0xba0ae0?, 0x1292310?})
	/opt/hostedtoolcache/go/1.22.0/x64/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd96bb0, 0x129b620})
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/sizes.go:228 +0x31e
go/types.(*Config).sizeof(...)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd96bb0?, 0x129b620?})
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/const.go:76 +0x9e
cd tools/src/helm-docs && GOOS= GOARCH= go build -o /home/runner/work/gateway/gateway/tools/bin/helm-docs $(sed -En 's,^import _ "(.*)".*,\1,p' pin.go)
go/types.representableConst({0xd9c8a8, 0x1265a68}, 0xc00250a000, 0x129b620, 0xc0009[154](https://github.com/envoyproxy/gateway/actions/runs/8166758184/job/22326043663?pr=2793#step:4:155)b0)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc00250a000, 0xc0023f5980, 0x129b620)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc00250a000, 0xc0023f5980, {0xd96ae8, 0xc0000ce2a0})
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/expr.go:375 +0x30d
go/types.(*Checker).assignment(0xc00250a000, 0xc0023f5980, {0xd96ae8, 0xc0000ce2a0}, {0xc6f965, 0x14})
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initConst(0xc00250a000, 0xc00250c180, 0xc0023f5980)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/assignments.go:126 +0x336
go/types.(*Checker).constDecl(0xc00250a000, 0xc00250c180, {0xd99510, 0xc00239b7e0}, {0xd99660, 0xc00239d9b0}, 0x0)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/decl.go:490 +0x348
go/types.(*Checker).objDecl(0xc00250a000, {0xda2b18, 0xc00250c180}, 0x0)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc00250a000)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc00250a000, {0xc0021870e8, 0x1, 0x1})
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/opt/hostedtoolcache/go/1.22.0/x64/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000236bd0, 0xc000483400)
	/home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000483400)
	/home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc0006494a0, 0xc000483400)
	/home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x53?)
	/home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine [175](https://github.com/envoyproxy/gateway/actions/runs/8166758184/job/22326043663?pr=2793#step:4:176)
	/home/runner/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/refs.go:260 +0x1c5
make[1]: *** [tools/make/docs.mk:46: docs-api-gen] Error 2
@thbkrkr
Copy link
Contributor

thbkrkr commented Mar 7, 2024

This will be fixed once

is resolved.

@thbkrkr thbkrkr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants