MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

Compile failed #43

Closed hh9527 closed 2 years ago

hh9527 commented 2 years ago

after cargo install, I got the following messages, it maybe caused by breaking change of clap 3.x

error[E0432]: unresolved import `clap::Clap`
 --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:2:25
  |
2 | use clap::{AppSettings, Clap, ValueHint};
  |                         ^^^^ no `Clap` in the root

error: cannot determine resolution for the derive macro `Clap`
 --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:9:10
  |
9 | #[derive(Clap, Debug)]
  |          ^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:10:3
   |
10 | #[clap(author, about, version)]
   |   ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:11:3
   |
11 | #[clap(long_version(option_env!("LONG_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"))))]
   |   ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:12:3
   |
12 | #[clap(setting(AppSettings::ColoredHelp))]
   |   ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:15:7
   |
15 |     #[clap(default_value("."))]
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:19:7
   |
19 |     #[clap(
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:30:7
   |
30 |     #[clap(short, long)]
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:34:7
   |
34 |     #[clap(short('v'), long("verbose"), parse(from_occurrences))]
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error[E0599]: no function or associated item named `parse` found for struct `Args` in the current sc
ope
  --> /home/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/xq-0.1.7/src/bin/main.rs:54:28
   |
13 | struct Args {
   | ----------- function or associated item `parse` not found for this
...
54 |     let args: Args = Args::parse();
   |                            ^^^^^ function or associated item not found in `Args`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `parse`, perhaps you need to implement one of them:
           candidate #1: `Parser`
           candidate #2: `nom::internal::Parser`
           candidate #3: `nom::sequence::Tuple`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: failed to compile `xq v0.1.7`, intermediate artifacts can be found at `/tmp/cargo-installlxSc
4q`

Caused by:
  could not compile `xq` due to 10 previous errors
MiSawa commented 2 years ago

Oops sorry, forgot to publish the new version. Published 0.1.8 which should compile.

MiSawa commented 2 years ago

Thank you for reporting!!

hh9527 commented 2 years ago

Wow, in 2 minutes? Awesome!