liyuan462/rust_lang_cn

Build failed on nightly rust

Closed this issue · 7 comments

😍  rust_lang_cn git:(master) ✗ cargo build --verbose
error: unable to get packages from source

Caused by:
  failed to parse manifest at `/Users/messense/.cargo/registry/src/github.com-1ecc6299db9ec823/iron-0.3.0/Cargo.toml`

Caused by:
  you have already provided an operation, such as =, ~, or ^; only use one
😍  rust_lang_cn git:(master) ✗ rustc --version
rustc 1.12.0-nightly (576f76659 2016-08-09)
😍  rust_lang_cn git:(master) ✗ cargo --version
cargo 0.13.0-nightly (c205132 2016-08-09)

看起来是 iron 0.3.0 的锅

什么意思,解释一下?不过我rustc没用nightly: rustc 1.9.0 (e4e8b6668 2016-05-18)

plugin = "0.2*"

iron/iron@16c858e

某个 crate 依赖有这个代码的 iron,nightly rust 中的 cargo 似乎不认这种 version 表示方法了?

额,先用稳定版rust的编译吧

@liyuan462 另外用 iron 0.4.0 似乎也是挂了。

Compiling rust_lang_cn v1.0.1 (file:///Users/messense/Projects/rust_lang_cn)
src/handlers/user.rs:211:33: 211:34 error: mismatched types [E0308]
src/handlers/user.rs:211                 resp.set_cookie(c);
                                                         ^
src/handlers/user.rs:211:33: 211:34 help: run `rustc --explain E0308` to see a detailed explanation
src/handlers/user.rs:211:33: 211:34 note: expected type `hyper::header::Cookie`
src/handlers/user.rs:211:33: 211:34 note:    found type `cookie::Cookie`
src/handlers/user.rs:608:21: 608:22 error: mismatched types [E0308]
src/handlers/user.rs:608     resp.set_cookie(c);
                                             ^
src/handlers/user.rs:608:21: 608:22 help: run `rustc --explain E0308` to see a detailed explanation
src/handlers/user.rs:608:21: 608:22 note: expected type `hyper::header::Cookie`
src/handlers/user.rs:608:21: 608:22 note:    found type `cookie::Cookie`
error: aborting due to 2 previous errors
error: Could not compile `rust_lang_cn`.

To learn more, run the command again with --verbose.

嗯,目前经测试过的版本是iron0.3.0,还没升,主要是一些依赖的库可能会不兼容。

@liyuan462 应该在 Cargo.toml 里面指定下具体版本,用 * 不太好啊.....,cargo update 一下感觉就乱套了