tversteeg / emplace

šŸ‘©ā€ā¤ļøā€šŸ’‹ā€šŸ‘© Synchronize installed packages on multiple machines
GNU Affero General Public License v3.0
257 stars 23 forks source link

[BUG] Install failure wrt usage of clap #320

Closed jayvdb closed 8 months ago

jayvdb commented 2 years ago

Describe the bug While installing I encounter

$ cargo install emplace
    Updating crates.io index
  Downloaded emplace v1.4.2
  Downloaded 1 crate (43.1 KB) in 1.83s
  Installing emplace v1.4.2
  Downloaded colored v2.0.0
  Downloaded dirs v4.0.0
  Downloaded rand_chacha v0.3.1
  Downloaded ppv-lite86 v0.2.16
  Downloaded num-integer v0.1.45
  Downloaded rand_core v0.6.3
  Downloaded getrandom v0.2.7
  Downloaded base64 v0.13.0
  Downloaded chrono v0.4.19
  Downloaded rand v0.8.5
  Downloaded time v0.1.44
  Downloaded num-traits v0.2.15
  Downloaded sys-info v0.9.1
  Downloaded heck v0.3.3
  Downloaded ron v0.7.1
  Downloaded proc-macro-hack v0.5.19
  Downloaded strum_macros v0.22.0
  Downloaded git-version v0.3.5
  Downloaded bugreport v0.4.1
  Downloaded enum_dispatch v0.3.8
  Downloaded git-version-macro v0.3.5
  Downloaded shell-escape v0.1.5
  Downloaded zeroize v1.5.7
  Downloaded clap_generate v3.0.3
  Downloaded clap_complete v3.2.3
  Downloaded unicode-segmentation v1.9.0
  Downloaded strum v0.22.0
  Downloaded dialoguer v0.9.0
  Downloaded simplelog v0.11.2
  Downloaded run_script v0.9.0
  Downloaded fsio v0.3.1
  Downloaded 31 crates (5.5 MB) in 4.02s (largest was `fsio` at 2.7 MB)
...
error[E0433]: failed to resolve: could not find `crate_version` in `clap`
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:31:24
   |
31 |         .version(clap::crate_version!())
   |                        ^^^^^^^^^^^^^ could not find `crate_version` in `clap`

error[E0433]: failed to resolve: could not find `crate_authors` in `clap`
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:32:23
   |
32 |         .author(clap::crate_authors!())
   |                       ^^^^^^^^^^^^^ could not find `crate_authors` in `clap`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:46:26
   |
46 |                         .about("Don't prompt the user and try to install everything"),
   |                          ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:53:18
   |
53 |                 .about("The location of the configuration file")
   |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:76:8
   |
76 |                         .about(
   |                          ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:88:8
   |
88 |                         .about("The command as entired in the terminal")
   |                          ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
  --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:98:8
   |
98 |                         .about("Path to shell history file")
   |                          ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
   --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:105:26
    |
105 |                         .about("Don't prompt the user and select everything"),
    |                          ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
   --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:115:18
    |
115 |                 .about("Create a new config")
    |                  ^^^^^ method not found in `Arg<'_>`

error[E0599]: no method named `about` found for struct `Arg` in the current scope
   --> /home/jayvdb/.cargo/registry/src/github.com-1ecc6299db9ec823/emplace-1.4.2/src/main.rs:122:18
    |
122 |                 .about("Print out path to config")
    |                  ^^^^^ method not found in `Arg<'_>`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `emplace` due to 10 previous errors
error: failed to compile `emplace v1.4.2`, intermediate artifacts can be found at `/tmp/cargo-installAVoCqU`

To Reproduce Steps to reproduce the behavior:

  1. cargo install emplace

Expected behavior Build and install succeeds

Desktop (please complete the following information):

Additional context

Machine information Print the contents of emplace bugreport here: Not possible.

$ cargo --version
cargo 1.62.1 (a748cf5a3 2022-06-08)
jayvdb commented 2 years ago

When I run cargo install --path . there are only warnings, so it looks like the above problem would be solved by a new release.

warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
  --> src/init.rs:50:28
   |
50 |             clap_generate::generate(Bash, &mut public_clap_app(), "emplace", &mut io::stdout())
   |                            ^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
  --> src/init.rs:52:33
   |
52 |         "zsh" => clap_generate::generate(Zsh, &mut public_clap_app(), "emplace", &mut io::stdout()),
   |                                 ^^^^^^^^

warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
  --> src/init.rs:54:28
   |
54 |             clap_generate::generate(Fish, &mut public_clap_app(), "emplace", &mut io::stdout())
   |                            ^^^^^^^^

warning: `emplace` (bin "emplace") generated 3 warnings
jayvdb commented 2 years ago

The warnings on master have been fixed. Thanks. Now just need to wait for a release.