Skip to content

no matching package named couchbase-lite-core-sys found #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CedricCouton opened this issue Aug 1, 2020 · 6 comments
Closed

no matching package named couchbase-lite-core-sys found #41

CedricCouton opened this issue Aug 1, 2020 · 6 comments

Comments

@CedricCouton
Copy link

CedricCouton commented Aug 1, 2020

Hi,

I have a problem when I try to use the project as depencency like
couchbase-lite = { git = "https://github.com/Dushistov/couchbase-lite-rust.git"}
The cargo build is ko with this error : error: no matching package named couchbase-lite-core-sysfound location searched: registryhttps://github.com/rust-lang/crates.io-index`
required by package couchbase-lite v0.3.1 (https://github.com/Dushistov/couchbase-lite-rust.git#ec6390bb)
`
My cargo version is : cargo 1.45.1

It seem to be linked with the couchbase-lite module and sys dependency : couchbase-lite-core-sys = "0.2.2", in the old version of the project the dependency was referenced with the relative path and my build was ok.
Do I miss something ?

Thanks

@Dushistov
Copy link
Owner

Dushistov commented Aug 1, 2020

dependency was referenced with the relative path

The relative path cause some problems in long run, in some cases c++ dependency should
be rebuild, but cargo can not understand this, so version change of couchbase-lite-core-sys
works in more reliable way.

So you need reference both crates in your Cargo.toml,
for example in my project that uses couchbase-lite-rust I use:

couchbase-lite = { git = "https://github.com/Dushistov/couchbase-lite-rust", rev = "ec6390bbb36c47a9254b7a4fdb27b9b1feccc92a" }
couchbase-lite-core-sys = { git = "https://github.com/Dushistov/couchbase-lite-rust", rev = "ec6390bbb36c47a9254b7a4fdb27b9b1feccc92a" }

@CedricCouton
Copy link
Author

CedricCouton commented Aug 1, 2020

If I try your solution I have this problem :
error: no matching package named couchbase-lite-core-sys found
location searched: registry https://github.com/rust-lang/crates.io-index
required by package couchbase-lite v0.3.1 (https://github.com/Dushistov/couchbase-lite-rust?rev=ec6390bbb36c47a9254b7a4fdb27b9b1feccc92a#ec6390bb)

my cargo.toml :

[dependencies]
couchbase-lite = { git = "https://github.com/Dushistov/couchbase-lite-rust", rev = "ec6390bbb36c47a9254b7a4fdb27b9b1feccc92a" }
couchbase-lite-core-sys = { git = "https://github.com/Dushistov/couchbase-lite-rust", rev = "ec6390bbb36c47a9254b7a4fdb27b9b1feccc92a" }

@Dushistov
Copy link
Owner

I forgot to say, this is not dependicies section,
it is [patch.crates-io] section: https://doc.rust-lang.org/edition-guide/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html

in dependency section you need only specify couchbase-lite = version

@CedricCouton
Copy link
Author

CedricCouton commented Aug 1, 2020

Yes, and me I forgot to ask you if the patch section can solve the problem ^^. So it solve it ^^, thanks!. The patch section of the couchbase-lite-rust is to be copied globally or is it automatically inherited?

@Dushistov
Copy link
Owner

If you mean this:

http = { git = "https://github.com/Dushistov/http", rev = "3ad3b825edc3a0d9048a6af5ab524f2fc51bde30" }

then no, it is not inherited.
But some lines may be unnecessary for you. For example cmake-rs patch required if you target iOS,
for other cases you can use not patched cmake-rs.

http and tungstenite are important if you use replication.
By the way tungstenite patches was accepted and included into new release,
so in the near future I will remove tungstenite from patch section.
http patch is still hanging though (hyperium/http#422)

@CedricCouton
Copy link
Author

CedricCouton commented Aug 2, 2020

Ok so as I use replication I must add those patch lines in my project until your patches are accepted.
Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants