-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update collector-gen to v0.14.0 (#1093)
I was unable to use controller-gen v0.8 through v0.13 on my machine because of a segfault: ``` ❯ make controller-gen && ./bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." GOBIN=/home/rauno/projects/odigos/odigos/api/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0 go: downloading sigs.k8s.io/controller-tools v0.13.0 go: downloading github.com/spf13/cobra v1.7.0 go: downloading golang.org/x/tools v0.12.0 go: downloading k8s.io/apiextensions-apiserver v0.28.0 go: downloading k8s.io/apimachinery v0.28.0 go: downloading k8s.io/api v0.28.0 go: downloading github.com/mattn/go-isatty v0.0.17 go: downloading golang.org/x/sys v0.11.0 go: downloading golang.org/x/mod v0.12.0 go: downloading golang.org/x/net v0.14.0 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=0xa0ddaf] goroutine 178 [running]: go/types.(*Checker).handleBailout(0xc0003bee00, 0xc000ac5d40) /usr/local/go/src/go/types/check.go:367 +0x88 panic({0xbc7860?, 0x12b38a0?}) /usr/local/go/src/runtime/panic.go:770 +0x132 go/types.(*StdSizes).Sizeof(0x0, {0xdc35d8, 0x12bc080}) /usr/local/go/src/go/types/sizes.go:228 +0x30f go/types.(*Config).sizeof(...) /usr/local/go/src/go/types/sizes.go:333 go/types.representableConst.func1({0xdc35d8?, 0x12bc080?}) /usr/local/go/src/go/types/const.go:76 +0x9e go/types.representableConst({0xdc99b0, 0x1286f80}, 0xc0003bee00, 0x12bc080, 0x0) /usr/local/go/src/go/types/const.go:92 +0x192 go/types.(*Checker).arrayLength(0xc0003bee00, {0xdc7c60, 0xc0003d8b80?}) /usr/local/go/src/go/types/typexpr.go:510 +0x2d3 go/types.(*Checker).typInternal(0xc0003bee00, {0xdc6280, 0xc0003e6660}, 0x0) /usr/local/go/src/go/types/typexpr.go:299 +0x49d go/types.(*Checker).definedType(0xc0003bee00, {0xdc6280, 0xc0003e6660}, 0xc000ac5328?) /usr/local/go/src/go/types/typexpr.go:180 +0x37 go/types.(*Checker).varType(0xc0003bee00, {0xdc6280, 0xc0003e6660}) /usr/local/go/src/go/types/typexpr.go:145 +0x25 go/types.(*Checker).structType(0xc0003bee00, 0xc0003c9ce0, 0xc0003c9ce0?) /usr/local/go/src/go/types/struct.go:113 +0x19f go/types.(*Checker).typInternal(0xc0003bee00, {0xdc61f0, 0xc0003d2f78}, 0xc0003e0500) /usr/local/go/src/go/types/typexpr.go:316 +0x1345 go/types.(*Checker).definedType(0xc0003bee00, {0xdc61f0, 0xc0003d2f78}, 0xc91787?) /usr/local/go/src/go/types/typexpr.go:180 +0x37 go/types.(*Checker).typeDecl(0xc0003bee00, 0xc0003e0500, 0xc0003d6d80, 0x0) /usr/local/go/src/go/types/decl.go:615 +0x44d go/types.(*Checker).objDecl(0xc0003bee00, {0xdcef60, 0xc0003e0500}, 0x0) /usr/local/go/src/go/types/decl.go:197 +0xa7f go/types.(*Checker).packageObjects(0xc0003bee00) /usr/local/go/src/go/types/resolver.go:681 +0x425 go/types.(*Checker).checkFiles(0xc0003bee00, {0xc0003b19c8, 0x3, 0x3}) /usr/local/go/src/go/types/check.go:408 +0x1a5 go/types.(*Checker).Files(...) /usr/local/go/src/go/types/check.go:372 sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc00029d380, 0xc0001b7260) /home/rauno/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(0xc0001b7260) /home/rauno/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(0xc00042d0e0, 0xc0001b7260) /home/rauno/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(0x45?) /home/rauno/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 31 /home/rauno/go/pkg/mod/sigs.k8s.io/controller-tools@v0.13.0/pkg/loader/refs.go:260 +0x1c5 ``` Fortunately v0.14 fixed the issue. From the generated results it seems that much didn't change so perhaps it's a safe update?
- Loading branch information
Showing
15 changed files
with
243 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.