ouch icon indicating copy to clipboard operation
ouch copied to clipboard

`cargo install ouch` fails to compile

Open teenjuna opened this issue 4 years ago • 2 comments

Version

v0.3.1

Description

After executing cargo install ouch, I get the following output:

❯ cargo install ouch
    Updating crates.io index
  Downloaded ouch v0.3.1
  Downloaded 1 crate (27.6 KB) in 2.05s
  Installing ouch v0.3.1
  Downloaded indexmap v1.8.0
  Downloaded quote v1.0.15
  Downloaded tar v0.4.38
  Downloaded zstd-safe v4.1.3+zstd.1.5.1
  Downloaded xz2 v0.1.6
  Downloaded zstd v0.9.2+zstd.1.5.1
  Downloaded syn v1.0.86
  Downloaded zstd-sys v1.6.2+zstd.1.5.1
  Downloaded crc32fast v1.3.1
  Downloaded clap_generate v3.0.0-beta.5
  Downloaded libc v0.2.116
  Downloaded lzma-sys v0.1.17
  Downloaded 12 crates (2.5 MB) in 1.95s
   Compiling libc v0.2.116
   Compiling version_check v0.9.4
   Compiling proc-macro2 v1.0.36
   Compiling autocfg v1.0.1
   Compiling unicode-xid v0.2.2
   Compiling pkg-config v0.3.24
   Compiling syn v1.0.86
   Compiling memchr v2.4.1
   Compiling unicode-segmentation v1.8.0
   Compiling hashbrown v0.11.2
   Compiling unicode-width v0.1.9
   Compiling cfg-if v1.0.0
   Compiling termcolor v1.1.2
   Compiling lazy_static v1.4.0
   Compiling crc32fast v1.3.1
   Compiling strsim v0.10.0
   Compiling bitflags v1.3.2
   Compiling adler v1.0.2
   Compiling zstd-safe v4.1.3+zstd.1.5.1
   Compiling same-file v1.0.6
   Compiling byteorder v1.4.3
   Compiling fs-err v2.6.0
   Compiling once_cell v1.9.0
   Compiling unicase v2.6.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling indexmap v1.8.0
   Compiling miniz_oxide v0.4.4
   Compiling heck v0.3.3
   Compiling textwrap v0.14.2
error[E0596]: cannot borrow `boundary` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:117:25
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                                           -------- help: consider changing this to be mutable: `mut boundary`
...
117 |                         boundary(&mut out);
    |                         ^^^^^^^^ cannot borrow as mutable

error[E0596]: cannot borrow `with_word` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:119:21
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                             --------- help: consider changing this to be mutable: `mut with_word`
...
119 |                     with_word(&word[init..next_i], &mut out);
    |                     ^^^^^^^^^ cannot borrow as mutable

error[E0596]: cannot borrow `boundary` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:128:25
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                                           -------- help: consider changing this to be mutable: `mut boundary`
...
128 |                         boundary(&mut out);
    |                         ^^^^^^^^ cannot borrow as mutable

error[E0596]: cannot borrow `with_word` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:132:21
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                             --------- help: consider changing this to be mutable: `mut with_word`
...
132 |                     with_word(&word[init..i], &mut out);
    |                     ^^^^^^^^^ cannot borrow as mutable

error[E0596]: cannot borrow `boundary` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:143:21
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                                           -------- help: consider changing this to be mutable: `mut boundary`
...
143 |                     boundary(&mut out);
    |                     ^^^^^^^^ cannot borrow as mutable

error[E0596]: cannot borrow `with_word` as mutable, as it is not declared as mutable
   --> /Users/virginiacool/.cargo/registry/src/github.com-1ecc6299db9ec823/heck-0.3.3/src/lib.rs:147:17
    |
60  | fn transform<F, G>(s: &str, with_word: F, boundary: G) -> String
    |                             --------- help: consider changing this to be mutable: `mut with_word`
...
147 |                 with_word(&word[init..], &mut out);
    |                 ^^^^^^^^^ cannot borrow as mutable

For more information about this error, try `rustc --explain E0596`.
error: could not compile `heck` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ouch v0.3.1`, intermediate artifacts can be found at `/Users/virginiacool/.cargo/target`

Caused by:
  build failed

Current Behavior

No response

Expected Behavior

The package should compile!

Additional Information

System: MacOS 12.0.1 Cargo: 1.57.0-nightly (7fbbf4e8f 2021-10-19)

teenjuna avatar Jan 30 '22 05:01 teenjuna

Thanks for your bug report!

You tried installing ouch 0.3.1, in this version we used a locked version of clap that is failing to compile heck.

To solve this issue I just need to publish a new version of ouch to crates.io, I have been delaying this task for several months now.

Am super busy lately but will try to solve this soon, for now, if you want to install ouch, you need to clone and run cargo install --path . inside of this repository.

marcospb19 avatar Feb 01 '22 17:02 marcospb19

Thanks, it worked

teenjuna avatar Feb 03 '22 02:02 teenjuna

0.4.0 has been published, this should be fixed now

figsoda avatar Nov 23 '22 23:11 figsoda