Skip to content
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

Failed to build examples #99

Closed
flyq opened this issue Jul 31, 2020 · 1 comment
Closed

Failed to build examples #99

flyq opened this issue Jul 31, 2020 · 1 comment

Comments

@flyq
Copy link

flyq commented Jul 31, 2020

I pull the last code: 89b1562

and build:

cargo build --release --examples

error log

   Compiling devise v0.2.0
   Compiling pear v0.1.2
   Compiling rocket_http v0.4.4
error: proc macro panicked
   --> /home/flyq/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_http-0.4.4/src/parse/uri/parser.rs:119:34
    |
119 |             let path_and_query = pear_try!(path_and_query(is_pchar));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `rocket_http`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Maybe it is a bug of macro_rules!: Always capture tokens for macro_rules! arguments

According to above, I try this:

$ cargo update -p pear
    Updating crates.io index
    Updating pear v0.1.2 -> v0.1.4

$ cargo update -p rocket_http
    Updating crates.io index
    Updating cookie v0.11.2 -> v0.11.3
    Updating rocket_http v0.4.4 -> v0.4.5

and it doesn't fix it:

 Compiling rocket_http v0.4.5
error: proc macro panicked
   --> /home/flyq/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket_http-0.4.5/src/parse/uri/parser.rs:119:34
    |
119 |             let path_and_query = pear_try!(path_and_query(is_pchar));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling paillier v0.3.4 (https://github.com/KZen-networks/rust-paillier?tag=v0.3.4#564352cb)
   Compiling bulletproof v0.2.5 (https://github.com/KZen-networks/bulletproofs?tag=v0.2.5#00be0db5)
error: aborting due to previous error

error: could not compile `rocket_http`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

env

Ubuntu 18.04, I ran the examples successfully before.

$ rustc --version
rustc 1.47.0-nightly (6c8927b0c 2020-07-26)
$ cargo --version
cargo 1.47.0-nightly (aa6872140 2020-07-23)
@flyq
Copy link
Author

flyq commented Jul 31, 2020

I delete the Cargo.lock file and build again, succeeded.

@flyq flyq closed this as completed Jul 31, 2020
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

1 participant