Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Panic on make generate on Terrajet based provider with go 1.18 #271

Open
Duologic opened this issue Apr 1, 2022 · 2 comments
Open

Panic on make generate on Terrajet based provider with go 1.18 #271

Duologic opened this issue Apr 1, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Duologic
Copy link

Duologic commented Apr 1, 2022

What happened?

Earlier this week we were updating our Terrajet based provider and ran into this panic
while running make generate:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x1e91a76]

goroutine 1 [running]:
github.com/crossplane/terrajet/pkg/types.init.0()
        /Users/julienduchesne/Repos/provider-jet-grafana/.work/pkg/pkg/mod/github.com/crossplane/[email protected]`/pkg/types/reference.go`:73 +0x116
exit status 2
apis/generate.go:33: running "go": exit status 1
15:12:49 [FAIL]
make[1]: *** [go.generate] Error 1
make: *** [generate] Error 2

How can we reproduce it?

  1. Install go 1.18
  2. Checkout https://github.com/grafana/crossplane-provider-grafana
  3. Run make generate

The resolution was to downgrade to go v1.17.

I assume it can/will happen with other Terrajet projects too.

When we digged a little bit, then it quickly went into the go/types library, so I'm not
sure if this is a Terrajet issue or something upstream.

backref downstream: grafana/crossplane-provider-grafana#14

@Duologic Duologic added the bug Something isn't working label Apr 1, 2022
@turkenh turkenh changed the title Panic on make generate on Terrajet based provider Panic on make generate on Terrajet based provider with go 1.18 Apr 1, 2022
@ttreptow
Copy link

Updating golang.org/x/tools seems to fix the problem. The version I get with go get -u golang.org/x/tools is v0.1.11

@loafoe
Copy link

loafoe commented Jul 5, 2022

@ttreptow nice! confirmed the crashes are gone with Go 1.18.2 -- after upgrading tools to v0.1.11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants