oppiliappan/dijo

use of unstable library feature 'str_strip': newly added

stephen-hill opened this issue · 4 comments

Hi

I have just tried updating from v0.1.5 to v0.2.0 using cargo install dijo and I get the following error:

   Compiling dijo v0.2.0
error[E0658]: use of unstable library feature 'str_strip': newly added
  --> /home/stephen/.cargo/registry/src/github.com-1ecc6299db9ec823/dijo-0.2.0/src/command.rs:65:70
   |
65 |                         view.set_content(format!("{}", contents) + c.strip_prefix(word).unwrap());
   |                                                                      ^^^^^^^^^^^^
   |
   = note: see issue #67302 <https://github.com/rust-lang/rust/issues/67302> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: failed to compile `dijo v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installgeGleK`

Caused by:
  could not compile `dijo`.

To learn more, run the command again with --verbose.

I'm running Alpine Linux v3.12, rustc v1.44, and cargo v.144.

Thanks

Ah strip_prefix was added only in rustc v1.45.

You could, for now:

  • upgrade rustc: rustup update
  • try running the release binary (not sure if it would run on musl though)

I will look into making this compatible with v1.42.

Thanks

I was able to resolve this by replacing the rust and cargo packages, with the rustup package. I then installed rust and cargo again with rustup-init (which installed 1.45).

Then cargo install dijo ran correctly.

Cheers
Stephen

Should be fixed with release v0.2.2!