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

dependency: golang.org/x/sys is out of date #376

Closed
Hyperzsb opened this issue Jan 5, 2023 · 1 comment
Closed

dependency: golang.org/x/sys is out of date #376

Hyperzsb opened this issue Jan 5, 2023 · 1 comment

Comments

@Hyperzsb
Copy link

Hyperzsb commented Jan 5, 2023

Env

$ go version
go version go1.19 darwin/amd64

Problem

Today, when I was following the README to learn how to use bbolt in my project, I encounter a problem looking like this:

$ go run .
# golang.org/x/sys/unix
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_darwin.1_13.go:29:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:27:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.1_13.go:40:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: too many errors

My Code

My code only calls some basic functions like bolt.Open(), tx.CreateBucketIfNotExists(), b.Put(), and b.Get(). Just a very simple demo.

Solution

After googling this problem, I found some similar issues available, like golang/go#51706. According to these issues, the reason for this problem is that the package golang.org/x/sys (which is a dependency of bbolt) is out of date. So, I successfully fix it by updating golang.org/x/sys to the latest version with:

$ go get -u golang.org/x/sys
go: downloading golang.org/x/sys v0.4.0
go: upgraded golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d => v0.4.0

Suggestion

I found the go.mod in the master branch has already used golang.org/x/sys of v0.3.0, while the go.mod in the v1.3.6 tag is still using v0.0.0-20200923182605-d9f96fdee20d.

So, I suppose it may be a good idea to release a patch to solve this dependency issue along with some more features (like features mentioned in #353).

Thank you very much for your attention!

@ahrtr
Copy link
Member

ahrtr commented Jan 11, 2023

After #379 is merged, all dependencies, including golang.org/x/sys, can be bumped automatically.

After we release 1.3.7, this issue should can be resolved automatically.

@ahrtr ahrtr closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants