From f6c9fa028ea0b2b42b0ed0edeebb2d20fcfd25d9 Mon Sep 17 00:00:00 2001 From: Sergio Rubio Date: Thu, 25 Jul 2019 10:52:19 +0100 Subject: [PATCH] Bump badger to 2.0.0.rc2 Broken currently here: go: finding github.com/zippoxer/bow latest go: github.com/dgraph-io/badger@v2.0.0-rc.2+incompatible: go.mod has post-v2 module path "github.com/dgraph-io/badger/v2" at revision v2.0.0-rc.2 go: error loading module requirements Which seems to be related to https://github.com/dgraph-io/badger/issues/886 There's also a recent upstream API change in https://github.com/dgraph-io/badger/pull/874 that requires additional changes. --- db.go | 2 +- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db.go b/db.go index b7504a6..0d9e7e3 100644 --- a/db.go +++ b/db.go @@ -167,7 +167,7 @@ type DB struct { // Make sure to call Close after you're done. func Open(dir string, options ...Option) (*DB, error) { db := &DB{ - badgerOptions: badger.DefaultOptions, + badgerOptions: badger.DefaultOptions(dir), codec: jsoncodec.Codec{}, } diff --git a/go.mod b/go.mod index 1bb2189..c9089f7 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9 // indirect github.com/deckarep/golang-set v1.7.1 // indirect - github.com/dgraph-io/badger v2.0.0-rc.2+incompatible + github.com/dgraph-io/badger v2.0.0-rc2+incompatible github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/golang/protobuf v1.3.1 // indirect diff --git a/go.sum b/go.sum index 7a6e1ed..c238e1e 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9r github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/dgraph-io/badger v2.0.0-rc.2+incompatible h1:7KPp6xv5+wymkVUbkAnZZXvmDrJlf09m/7u1HG5lAYA= github.com/dgraph-io/badger v2.0.0-rc.2+incompatible/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= +github.com/dgraph-io/badger v2.0.0-rc2+incompatible h1:6fXfqViMStaKb73bxivvD9hgwYdWyiEKzwWNVkXhslE= +github.com/dgraph-io/badger v2.0.0-rc2+incompatible/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec h1:sElGDs3V8VdCxH5tWi0ycWJzteOPLJ3HtItSSKI95PY= github.com/dgryski/go-farm v0.0.0-20190323231341-8198c7b169ec/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=