khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.01k stars 37 forks source link

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

Closed Aloso closed 1 year ago

Aloso commented 2 years ago

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`
ecton commented 2 years ago

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.