Unable to build textnonce 0.3.1 using rustc 1.8.0, 1.9.0 beta, 1.10.0-nightly (6974800c6 2016-05-08) #11

Closed
opened 2016-05-11 10:03:40 +12:00 by m-barthelemy · 3 comments
m-barthelemy commented 2016-05-11 10:03:40 +12:00 (Migrated from github.com)

Hi,

All my attempts to build textnonce throw this error:

cargo build
   Compiling textnonce v0.3.1
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 error: mismatched types [E0308]
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17         serde_codegen::register(&mut registry);
                                                                                                                  ^~~~~~~~~~~~~
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 help: run `rustc --explain E0308` to see a detailed explanation
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 note: expected type `&mut syntex::Registry`
/root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 note:    found type `&mut inner::syntex::Registry`
error: aborting due to previous error
error: Could not compile `textnonce`.

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

My project doesn't use textnonce directly but requires mongodb and bson as dependencies.
I'm totally new to Rust, and totally fail to understand what causes this error.

Is that a textnonce issue or something wrong with my environment?

Hi, All my attempts to build textnonce throw this error: ``` cargo build Compiling textnonce v0.3.1 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 error: mismatched types [E0308] /root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17 serde_codegen::register(&mut registry); ^~~~~~~~~~~~~ /root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 help: run `rustc --explain E0308` to see a detailed explanation /root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 note: expected type `&mut syntex::Registry` /root/.cargo/registry/src/github.com-1ecc6299db9ec823/textnonce-0.3.1/build.rs:17:33: 17:46 note: found type `&mut inner::syntex::Registry` error: aborting due to previous error error: Could not compile `textnonce`. To learn more, run the command again with --verbose. ``` My project doesn't use `textnonce` directly but requires `mongodb` and `bson` as dependencies. I'm totally new to Rust, and totally fail to understand what causes this error. Is that a textnonce issue or something wrong with my environment?
mikedilger commented 2016-05-11 10:46:00 +12:00 (Migrated from github.com)

Welcome to the Rust community. This error comes about when the version of a compiler plugin (in this case serde_codegen) is out of sync with the version of the rust compiler or a related crate (in this case syntex). Unfortunately until the rust compiler AST has stabilized, compiler plugins remain unstable and continue to cause these kinds of annoying downstream problems.

There is a flie Cargo.lock for your project which specifies which versions of these crates your project should use. You will need to get them in sync.

This command might fix it for you:

cargo update -p serde -p serde_codegen
Welcome to the Rust community. This error comes about when the version of a compiler plugin (in this case serde_codegen) is out of sync with the version of the rust compiler or a related crate (in this case syntex). Unfortunately until the rust compiler AST has stabilized, compiler plugins remain unstable and continue to cause these kinds of annoying downstream problems. There is a flie `Cargo.lock` for your project which specifies which versions of these crates your project should use. You will need to get them in sync. This command might fix it for you: ``` sh cargo update -p serde -p serde_codegen ```
mikedilger commented 2016-05-12 11:17:37 +12:00 (Migrated from github.com)

It appears the new version of syntex 0.32 was released. I've pushed a new textnonce version to get it back into sync. Try cargo update -p textnonce and then cargo build

It appears the new version of syntex 0.32 was released. I've pushed a new textnonce version to get it back into sync. Try `cargo update -p textnonce` and then `cargo build`
m-barthelemy commented 2016-05-13 01:53:46 +12:00 (Migrated from github.com)

Thanks a lot for your help! Indeed, the new version fixed my issue.

Thanks a lot for your help! Indeed, the new version fixed my issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mikedilger/textnonce#11
No description provided.