GitHub

2015-07-22 35 views
5

'dan bağımlı bir kasa oluştururken `Cargo.toml 'bulamadı rust-mosquitto library'u kullanmaya çalışıyorum. Benim şimdiki Cargo.toml geçerli: GitHub

[package] 
name = "HomeDaemon" 
version = "0.1.0" 
authors = ["RTR <[email protected]>"] 

[dependencies.mosquitto] 
git = "https://github.com/kteza1/rust-mosquitto" 

Ben cargo build çalıştırmak

, aşağıdaki hata bildirilir:

Could not find `Cargo.toml` in `/Users/ravitejareddy/.cargo/git/checkouts/rust-mosquitto-8203e77dcf072bf7/rust-mosquitto` 

~/.cargo/git/checkouts/rust-mosquitto-8203e77dcf072bf7/master fiili indirme Cargo.toml mevcut olduğunu göstermektedir.

Yukarıdaki yolda fazladan bir rust-mosquitto var, bu bir problem mi?

cevap

5

sorun senin Cargo.toml in examples/ticktock geliyor:

[dependencies.mosquitto] 
version = "*" 
path = "../../../rust-mosquitto" 

git den projenizi indirirken, tüm alt dizinleri daha Cargo.toml dosyalar için taranır. Eğer RUST_LOG=trace cargo build -v çalıştırırsanız, neler olduğunu görmek:

TRACE:cargo::ops::cargo_read_manifest: looking for root package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master, source_id=https://github.com/kteza1/rust-mosquitto#7e08a291 
TRACE:cargo::ops::cargo_read_manifest: looking for child package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master 
TRACE:cargo::ops::cargo_read_manifest: read_package; path=/Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/Cargo.toml; source-id=https://github.com/kteza1/rust-mosquitto#7e08a291 
TRACE:cargo::ops::cargo_read_manifest: looking for child package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/.git 
TRACE:cargo::ops::cargo_read_manifest: not processing /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/.git 
TRACE:cargo::ops::cargo_read_manifest: looking for child package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/examples 
TRACE:cargo::ops::cargo_read_manifest: looking for child package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/examples/c-mosquitto 
TRACE:cargo::ops::cargo_read_manifest: looking for child package: /Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/examples/ticktock 
TRACE:cargo::ops::cargo_read_manifest: read_package; path=/Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/master/examples/ticktock/Cargo.toml; source-id=https://github.com/kteza1/rust-mosquitto#7e08a291 
DEBUG:cargo: handle_error; err=CliError { error: ChainedError { error: Unable to update https://github.com/kteza1/rust-mosquitto, cause: Could not find `Cargo.toml` in `/Users/shep/.cargo/git/checkouts/rust-mosquitto-77eb7033f32b19c9/rust-mosquitto` }, unknown: false, exit_code: 101 } 

Kargo ardından iç içe Cargo.toml memnun tüm bağımlılıklarını olabileceğini sağlamaya çalışır.

+0

Ama bu neden bir hata? – tez

+2

@tez: Çünkü depoda sadece * iki tane * olduğunda * üç * dizin var. Deponuzun * her zaman * “rust-mosquitto” ve * başka bir şey * ile kontrol edilmesini etkin bir şekilde gerektiriyorsunuz. –

+0

Tamam. Klasör yapısı, Cargo.toml'ın şube adı içinde bulunduğu yere indirilirken farklıdır. Bu durumda 'efendi'. – tez