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

Fix vendored build #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuperSandro2000
Copy link

Before when running go mod vendor and then go build the following error would be produced:

$ go build ./...
vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_linux.go:2270:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod) vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

This is fixed by bumping the minimal go version and then running go mod tidy

Before when running go mod vendor and then go build the following error
would be produced:

$ go build ./...
vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_linux.go:2270:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

This is fixed by bumping the minimal go version and then running go mod tidy
@Bobgy
Copy link
Collaborator

Bobgy commented Mar 8, 2023

Thank you for the PR!
Does it fail without vendoring?

What is the purpose of go build ./...? Why is go build . not enough?

@SuperSandro2000
Copy link
Author

Does it fail without vendoring?

Nope, only with it.

What is the purpose of go build ./...? Why is go build . not enough?

I was just being lazy, ./... should build everything. Same error.

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