You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 functionor 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 functionor 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 functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared functionor variable
/Users/hyperzsb/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared functionor 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!
The text was updated successfully, but these errors were encountered:
Env
Problem
Today, when I was following the README to learn how to use
bbolt
in my project, I encounter a problem looking like this:My Code
My code only calls some basic functions like
bolt.Open()
,tx.CreateBucketIfNotExists()
,b.Put()
, andb.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 ofbbolt
) is out of date. So, I successfully fix it by updatinggolang.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 themaster
branch has already usedgolang.org/x/sys
ofv0.3.0
, while thego.mod
in thev1.3.6
tag is still usingv0.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!
The text was updated successfully, but these errors were encountered: