orf/git-workspace

Installation using cargo fails with "no `strip_ansi_codes` in the root"

cipold opened this issue · 3 comments

I am running Arch Linux and try to install git-workspace. The only option for me seems to be using cargo install git-workspace.

When running the cargo install command compilation of git-workspace v0.8.0 fails with this output:

   Compiling git-workspace v0.8.0
error[E0432]: unresolved import `console::strip_ansi_codes`
 --> /home/micha/.cargo/registry/src/github.com-1ecc6299db9ec823/git-workspace-0.8.0/src/repository.rs:2:15
  |
2 | use console::{strip_ansi_codes, truncate_str};
  |               ^^^^^^^^^^^^^^^^ no `strip_ansi_codes` in the root

For more information about this error, try `rustc --explain E0432`.
error: failed to compile `git-workspace v0.8.0`, intermediate artifacts can be found at `/tmp/cargo-installbR3vGW`

Caused by:
  could not compile `git-workspace` due to previous error
orf commented

Hmm, I've not got a clue why this would be. strip_ansi_codes should always be available (source) and doesn't depend on any features.

I'll try and reproduce this, and I'm going to update a bunch of dependencies today and push a new release.

orf commented

Hmm, it does depend on ansi-parsing (https://docs.rs/console/0.15.0/src/console/lib.rs.html#89-90) but this is set in the cargo.toml.

I ran the following commands in a fresh archlinux docker container:

pacman -Sy base-devel
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 
$HOME/.cargo/bin/cargo install git-workspace

And it worked fine:

[root@867536eaf999 /]# $HOME/.cargo/bin/git-workspace --version
git-workspace 0.9.0

So perhaps the latest release fixed it?

Thank you for reacting that quickly and checking it yourself on Arch!

I can confirm it is now working:

Installed package `git-workspace v0.9.0` (executable `git-workspace`)
# git-workspace                                                                                                                  
git-workspace 0.9.0