cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.83k stars 1.25k forks source link

Bulk kv backend registration fails #937

Closed ermik closed 1 year ago

ermik commented 4 years ago

kv.List() called here: https://github.com/cayleygraph/cayley/blob/b9dabbed3f75eb7689fe0ce707606756ec77168a/graph/kv/registry.go#L11

returns an empty array.

The list of imports (modules are "GOFLAGS": "-mod=vendor") declared in client package used for testing:

import (
    "github.com/cayleygraph/cayley"
    "github.com/cayleygraph/cayley/graph"
    "github.com/cayleygraph/cayley/graph/path"
    "github.com/cayleygraph/cayley/schema"
    "github.com/cayleygraph/quad"
    "github.com/cayleygraph/quad/voc"

    // The drivers for cayley
    _ "github.com/cayleygraph/cayley/graph/kv" // "all"
    bg "github.com/cayleygraph/cayley/graph/kv/bolt"
    lg "github.com/cayleygraph/cayley/graph/kv/leveldb"

    // Init "single" writer; unnecessary when using cayley.Handle, here for verbosity.
    _ "github.com/cayleygraph/cayley/writer"

    // Import RDF vocabulary definitions to be able to expand IRIs like rdf:label.
    _ "github.com/cayleygraph/quad/voc/core"
)
dennwc commented 3 years ago

The order of those imports is important. I think you should import kv/bolt before kv.