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

Zoxide 0.7.7 fails to build #286

Closed
jenshnielsen opened this issue Oct 20, 2021 · 1 comment · Fixed by #287
Closed

Zoxide 0.7.7 fails to build #286

jenshnielsen opened this issue Oct 20, 2021 · 1 comment · Fixed by #287

Comments

@jenshnielsen
Copy link

See error below. I suspect this is due to the use of clap_derive 3.0 beta5
See https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#breaking-changes which mentions

Renamed Traits
    clap::Clap => clap::Parser
   Compiling proc-macro2 v1.0.30
   Compiling version_check v0.9.3
   Compiling libc v0.2.104
   Compiling syn v1.0.80
   Compiling unicode-xid v0.2.2
   Compiling autocfg v1.0.1
   Compiling ryu v1.0.5
   Compiling radium v0.5.3
   Compiling memchr v2.3.4
   Compiling lexical-core v0.7.6
   Compiling cfg-if v1.0.0
   Compiling bitflags v1.3.2
   Compiling unicode-segmentation v1.8.0
   Compiling unicode-width v0.1.9
   Compiling tap v1.0.1
   Compiling wyz v0.2.0
   Compiling arrayvec v0.5.2
   Compiling hashbrown v0.11.2
   Compiling funty v1.1.0
   Compiling static_assertions v1.1.0
   Compiling os_str_bytes v3.1.0
   Compiling strsim v0.10.0
   Compiling serde_derive v1.0.130
   Compiling vec_map v0.8.2
   Compiling lazy_static v1.4.0
   Compiling termcolor v1.1.2
   Compiling ppv-lite86 v0.2.14
   Compiling askama_escape v0.10.1
   Compiling serde v1.0.130
   Compiling anyhow v1.0.44
   Compiling remove_dir_all v0.5.3
   Compiling glob v0.3.0
   Compiling dunce v1.0.2
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling nom v6.2.1
   Compiling indexmap v1.7.0
   Compiling num-traits v0.2.14
   Compiling textwrap v0.14.2
   Compiling heck v0.3.3
   Compiling bitvec v0.19.5
   Compiling quote v1.0.10
   Compiling getrandom v0.2.3
   Compiling atty v0.2.14
   Compiling dirs-sys-next v0.1.2
   Compiling rand_core v0.6.3
   Compiling ordered-float v2.8.0
   Compiling dirs-next v2.0.0
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.4
   Compiling tempfile v3.2.0
   Compiling askama_shared v0.11.1
   Compiling clap_derive v3.0.0-beta.5
   Compiling askama_derive v0.10.5
   Compiling clap v3.0.0-beta.4
   Compiling askama v0.10.5
   Compiling clap_generate v3.0.0-beta.4
   Compiling zoxide v0.7.7
error: cannot find derive macro `Clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:13:10
   |
13 | #[derive(Clap, Debug)]
   |          ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:14:3
   |
14 | #[clap(
   |   ^^^^

error: cannot find derive macro `Clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:34:10
   |
34 | #[derive(Clap, Debug)]
   |          ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:36:7
   |
36 |     #[clap(min_values = 1, required = true, value_hint = ValueHint::DirPath)]
   |       ^^^^

error: cannot find derive macro `Clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:41:10
   |
41 | #[derive(Clap, Debug)]
   |          ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:43:7
   |
43 |     #[clap(value_hint = ValueHint::FilePath)]
   |       ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:47:7
   |
47 |     #[clap(arg_enum, long)]
   |       ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:51:7
   |
51 |     #[clap(long)]
   |       ^^^^

error: cannot find derive macro `Clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:62:10
   |
62 | #[derive(Clap, Debug)]
   |          ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:64:7
   |
64 |     #[clap(arg_enum)]
   |       ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:68:7
   |
68 |     #[clap(long)]
   |       ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:72:7
   |
72 |     #[clap(long, default_value = "z")]
   |       ^^^^

error: cannot find attribute `clap` in this scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:76:7
   |
76 |     #[clap(arg_enum, long, default_value = "pwd")]
   |       ^^^^

error: cannot find derive macro `Clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:100:10
    |
100 | #[derive(Clap, Debug)]
    |          ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:105:7
    |
105 |     #[clap(long)]
    |       ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:109:7
    |
109 |     #[clap(long, short, conflicts_with = "list")]
    |       ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:113:7
    |
113 |     #[clap(long, short, conflicts_with = "interactive")]
    |       ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:117:7
    |
117 |     #[clap(long, short, conflicts_with = "interactive")]
    |       ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:121:7
    |
121 |     #[clap(long, value_hint = ValueHint::DirPath, value_name = "path")]
    |       ^^^^

error: cannot find derive macro `Clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:126:10
    |
126 | #[derive(Clap, Debug)]
    |          ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:129:7
    |
129 |     #[clap(conflicts_with = "paths", long, short, value_name = "keywords")]
    |       ^^^^

error: cannot find attribute `clap` in this scope
   --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:131:7
    |
131 |     #[clap(
    |       ^^^^

error[E0407]: method `value_variants` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:55:10
   |
55 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `to_arg_value` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:55:10
   |
55 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `ArgValue` in `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:55:10
   |
55 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ could not find `ArgValue` in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `value_variants` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:80:10
   |
80 | #[derive(ArgEnum, Clone, Copy, Debug, Eq, PartialEq)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `to_arg_value` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:80:10
   |
80 | #[derive(ArgEnum, Clone, Copy, Debug, Eq, PartialEq)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `ArgValue` in `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:80:10
   |
80 | #[derive(ArgEnum, Clone, Copy, Debug, Eq, PartialEq)]
   |          ^^^^^^^ could not find `ArgValue` in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `value_variants` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:87:10
   |
87 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `to_arg_value` is not a member of trait `clap::ArgEnum`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:87:10
   |
87 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not a member of trait `clap::ArgEnum`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find `ArgValue` in `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:87:10
   |
87 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ could not find `ArgValue` in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `ArgValue` in crate `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:55:10
   |
55 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not found in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `ArgValue` in crate `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:80:10
   |
80 | #[derive(ArgEnum, Clone, Copy, Debug, Eq, PartialEq)]
   |          ^^^^^^^ not found in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `ArgValue` in crate `clap`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:87:10
   |
87 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ not found in `clap`
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0046]: not all trait items implemented, missing: `VARIANTS`, `from_str`, `as_arg`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:55:10
   |
55 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ missing `VARIANTS`, `from_str`, `as_arg` in implementation
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
   = help: implement the missing item: `const VARIANTS: &'static [&'static str] = value;`
   = help: implement the missing item: `fn from_str(_: &str, _: bool) -> Result<Self, String> { todo!() }`
   = help: implement the missing item: `fn as_arg(&self) -> Option<&'static str> { todo!() }`

error[E0046]: not all trait items implemented, missing: `VARIANTS`, `from_str`, `as_arg`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:80:10
   |
80 | #[derive(ArgEnum, Clone, Copy, Debug, Eq, PartialEq)]
   |          ^^^^^^^ missing `VARIANTS`, `from_str`, `as_arg` in implementation
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
   = help: implement the missing item: `const VARIANTS: &'static [&'static str] = value;`
   = help: implement the missing item: `fn from_str(_: &str, _: bool) -> Result<Self, String> { todo!() }`
   = help: implement the missing item: `fn as_arg(&self) -> Option<&'static str> { todo!() }`

error[E0046]: not all trait items implemented, missing: `VARIANTS`, `from_str`, `as_arg`
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:87:10
   |
87 | #[derive(ArgEnum, Debug)]
   |          ^^^^^^^ missing `VARIANTS`, `from_str`, `as_arg` in implementation
   |
   = note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
   = help: implement the missing item: `const VARIANTS: &'static [&'static str] = value;`
   = help: implement the missing item: `fn from_str(_: &str, _: bool) -> Result<Self, String> { todo!() }`
   = help: implement the missing item: `fn as_arg(&self) -> Option<&'static str> { todo!() }`

error[E0599]: no variant or associated item named `into_app` found for enum `app::App` in the current scope
  --> /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/build.rs:42:25
   |
42 |     let app = &mut App::into_app();
   |                         ^^^^^^^^ variant or associated item not found in `app::App`
   |
  ::: /home/jhn/.cargo/registry/src/github.com-1ecc6299db9ec823/zoxide-0.7.7/src/app/_app.rs:25:1
   |
25 | pub enum App {
   | ------------ variant or associated item `into_app` not found here
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `into_app`, perhaps you need to implement it:
           candidate #1: `IntoApp`
@ajeetdsouza
Copy link
Owner

You're right. The clap_derive dependency wasn't pinned in the clap repo, which caused projects to break when beta5 released. It's been fixed on their end, hopefully shouldn't happen in future.

Relevant issue: clap-rs/clap#2705

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

Successfully merging a pull request may close this issue.

2 participants