bonsaidb icon indicating copy to clipboard operation
bonsaidb copied to clipboard

Installing with `cargo install bonsaidb --features cli` fails

Open Aloso opened this issue 3 years ago • 1 comments
trafficstars

Error:

error[E0433]: failed to resolve: use of undeclared crate or module `bonsaidb_client`
 --> /home/ludwig/.cargo/registry/src/github.com-1ecc6299db9ec823/bonsaidb-0.4.1/src/cli.rs:5:5
  |
5 | use bonsaidb_client::{fabruic::Certificate, Client};
  |     ^^^^^^^^^^^^^^^ use of undeclared crate or module `bonsaidb_client`
  |
help: there is a crate or module with a similar name
  |
5 | use bonsaidb_core::{fabruic::Certificate, Client};
  |     ~~~~~~~~~~~~~

error[E0432]: unresolved import `bonsaidb_client`
 --> /home/ludwig/.cargo/registry/src/github.com-1ecc6299db9ec823/bonsaidb-0.4.1/src/cli.rs:5:5
  |
5 | use bonsaidb_client::{fabruic::Certificate, Client};
  |     ^^^^^^^^^^^^^^^ use of undeclared crate or module `bonsaidb_client`
  |
help: there is a crate or module with a similar name
  |
5 | use bonsaidb_core::{fabruic::Certificate, Client};
  |     ~~~~~~~~~~~~~

error[E0432]: unresolved import `crate::AnyServerConnection`
  --> /home/ludwig/.cargo/registry/src/github.com-1ecc6299db9ec823/bonsaidb-0.4.1/src/cli.rs:11:5
   |
11 | use crate::AnyServerConnection;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AnyServerConnection` in the root

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `bonsaidb` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bonsaidb v0.4.1`, intermediate artifacts can be found at `/tmp/cargo-installBU7lOT`

Aloso avatar May 29 '22 14:05 Aloso

Good find.

This can be worked around by adding the client and server features as well:

cargo install bonsaidb --features cli,client,server

I will also point out that the standalone CLI is very limited. Currently the CLI interface is meant more for embedding within your own application rather than using it without knowledge of your defined Schemas.

ecton avatar May 29 '22 15:05 ecton