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

Can't install using go1.15 #10

Closed
juandspy opened this issue Sep 20, 2022 · 1 comment
Closed

Can't install using go1.15 #10

juandspy opened this issue Sep 20, 2022 · 1 comment
Assignees

Comments

@juandspy
Copy link
Collaborator

Context

The go.mod file points to go1.15. However, when I try to install it I find some errors during the installation.

What's the error:

See logs
go build -o terraform-provider-rhoas
...
# github.com/hashicorp/terraform-plugin-go/internal/logging
/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.14.0/internal/logging/protocol.go:31:62: undefined: any
/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.14.0/internal/logging/protocol_data.go:136:9: undefined: os.WriteFile
/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.14.0/internal/logging/protocol_data.go:139:71: undefined: any
note: module requires Go 1.18
# github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.21.0/helper/logging/logging_http_transport.go:275:18: undefined: io.ReadAll
/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.21.0/helper/logging/logging_http_transport.go:283:13: undefined: io.NopCloser
note: module requires Go 1.18
# github.com/hashicorp/go-plugin
/go/pkg/mod/github.com/hashicorp/go-plugin@v1.4.4/rpc_server.go:49:22: undefined: net.ErrClosed
note: module requires Go 1.17
make: *** [Makefile:33: build] Error 2

How to reproduce

You can use a local version of go or a Dockerfile:

FROM golang:1.15

COPY . /app

WORKDIR /app

RUN make install

And then run:

❯ docker build -t terraform-provider-rhoas .
@juandspy
Copy link
Collaborator Author

Same error appears when using 1.16 and 1.17. The only way of fixing it is using 1.18, so I'll update the version in go.mod.

juandspy added a commit to juandspy/terraform-provider-rhoas that referenced this issue Sep 20, 2022
@juandspy juandspy self-assigned this Sep 20, 2022
juandspy added a commit that referenced this issue Sep 20, 2022
* update go version in go.mod to fix issue #10

* fix linting
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

1 participant