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

dep: update golang/x/sys to 9388b58f7150 #36

Merged
merged 2 commits into from May 23, 2022
Merged

Conversation

calvn
Copy link
Member

@calvn calvn commented May 23, 2022

Overview

This PR updates go.mod to specify go1.18 as the go version to use, and updates golang.org/x/sys to 9388b58f7150 (same as vault's go.mod as of ec0f941) to fix the build when using go1.18.

Prior to this change, build would fail with the following error:

$ make dev
==> Checking that code complies with gofmt requirements...
go generate
==> Removing old directory...
==> Building...
Number of parallel builds: 15

-->    darwin/amd64: github.com/hashicorp/vault-plugin-auth-alicloud/cmd/vault-plugin-auth-alicloud

1 errors occurred:
--> darwin/amd64 error: exit status 2
Stderr: # golang.org/x/sys/unix
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/syscall_darwin.1_13.go:29:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20201119102817-f84b799fce68/unix/zsyscall_darwin_amd64.go:121:3: too many errors

make: *** [dev] Error 1

Steps taken to update:

  1. Change version to go1.18 in go.mod
  2. go get go get -u golang.org/x/sys@9388b58f7150
  3. go mod tidy

Test output:

$ make test
==> Checking that code complies with gofmt requirements...
go generate
CGO_ENABLED=0 VAULT_TOKEN= VAULT_ACC= go test -v -tags='vault-plugin-auth-alibaba' $(go list ./... | grep -v /vendor/ | grep -v teamcity)  -count=1 -timeout=20m -parallel=4
=== RUN   TestParseRoleArn
--- PASS: TestParseRoleArn (0.00s)
=== RUN   TestParseAssumedRoleArn
--- PASS: TestParseAssumedRoleArn (0.00s)
=== RUN   TestParseEmpty
--- PASS: TestParseEmpty (0.00s)
=== RUN   TestBackend_Integration
=== RUN   TestBackend_Integration/EmptyList
=== RUN   TestBackend_Integration/CreateRole
=== RUN   TestBackend_Integration/ReadRole
=== RUN   TestBackend_Integration/ListOfOne
=== RUN   TestBackend_Integration/UpdateRole
=== RUN   TestBackend_Integration/ReadUpdatedRole
=== RUN   TestBackend_Integration/ListOfOne#01
=== RUN   TestBackend_Integration/DeleteRole
=== RUN   TestBackend_Integration/EmptyList#01
=== RUN   TestBackend_Integration/CreateRole#01
=== RUN   TestBackend_Integration/LoginSuccess
--- PASS: TestBackend_Integration (0.00s)
    --- PASS: TestBackend_Integration/EmptyList (0.00s)
    --- PASS: TestBackend_Integration/CreateRole (0.00s)
    --- PASS: TestBackend_Integration/ReadRole (0.00s)
    --- PASS: TestBackend_Integration/ListOfOne (0.00s)
    --- PASS: TestBackend_Integration/UpdateRole (0.00s)
    --- PASS: TestBackend_Integration/ReadUpdatedRole (0.00s)
    --- PASS: TestBackend_Integration/ListOfOne#01 (0.00s)
    --- PASS: TestBackend_Integration/DeleteRole (0.00s)
    --- PASS: TestBackend_Integration/EmptyList#01 (0.00s)
    --- PASS: TestBackend_Integration/CreateRole#01 (0.00s)
    --- PASS: TestBackend_Integration/LoginSuccess (0.00s)
=== RUN   TestBackend_Acceptance
--- SKIP: TestBackend_Acceptance (0.00s)
PASS
ok  	github.com/hashicorp/vault-plugin-auth-alicloud	0.699s
?   	github.com/hashicorp/vault-plugin-auth-alicloud/cmd/vault-plugin-auth-alicloud	[no test files]
?   	github.com/hashicorp/vault-plugin-auth-alicloud/tools	[no test files]
?   	github.com/hashicorp/vault-plugin-auth-alicloud/tools/login	[no test files]

Related Issues/Pull Requests

Similar to this PR on the HCL repo:

@calvn calvn requested a review from a team May 23, 2022 22:31
@calvn calvn merged commit 0df2365 into main May 23, 2022
@calvn calvn deleted the update-golang-sys-dep branch May 23, 2022 23:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants