Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

add support for golang 1.18 and 1.19 #29

Open
raffaelespazzoli opened this issue Aug 7, 2022 · 2 comments
Open

add support for golang 1.18 and 1.19 #29

raffaelespazzoli opened this issue Aug 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@raffaelespazzoli
Copy link

What problem are you facing?

panic error during make generate

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

goroutine 1 [running]:
github.com/crossplane/terrajet/pkg/types.init.0()
    /home/rspazzol/git/crossplane-github-provider/.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
06:50:29 [FAIL]
make[1]: *** [build/makelib/golang.mk:271: go.generate] Error 1
make: *** [build/makelib/common.mk:419: generate] Error 2

How could Template Provider help solve your problem?

this error does not happen with go 1.17, it seems to happen with following versions of go 1.18 and 1.19.
template provider should be tested with those versions of go, or upgraded to them.

@raffaelespazzoli raffaelespazzoli added the enhancement New feature or request label Aug 7, 2022
@displague
Copy link

I also ran into this problem. crossplane/terrajet#291 seems to correct it.

After that, I ran into another Go 1.18 problem:

ERRO Running error: buildir: failed to load package goarch: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool

This is resolved by adding GOLANGCILINT_VERSION ?= 1.48.0 to the Makefile (the version from upbound/build is older)

@raffaelespazzoli
Copy link
Author

I'm also getting this error:

/bin/bash: line 1: /home/rspazzol/git/provider-jet-github/.cache/tools/linux_x86_64/goimports: No such file or directory
make[1]: *** [build/makelib/golang.mk:271: go.generate] Error 127
make: *** [build/makelib/common.mk:419: generate] Error 2

the make file should download the needed tools automatically but it doesn't for reasons I can't understand.
running go install golang.org/x/tools/cmd/goimports@latest does not seem to fix the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants