I am facing a compilation error after switching one of my dependencies from cargo.io to a GitHub using Cargo. I would appreciate your assistance in resolving this issue.
Details:
- Language: Rust
- Package manager: Cargo
- Source Code: https://github.com/BurntSushi/ripgrep.git
- Change: Only Cargo.toml
Before:
....
[dependencies]
....
log = "0.4.5"
regex = "1.3.5"
serde_json = "1.0.23"
termcolor = "1.1.0"
....
After:
....
[dependencies]
....
log = "0.4.5"
regex = "1.3.5"
serde_json = "1.0.23"
termcolor = { git = "https://github.com/BurntSushi/termcolor.git", tag = "1.1.0" }
....
Build Log:
~/ripgrep# cargo build --release
Updating git repository `https://github.com/BurntSushi/termcolor.git`
Compiling ripgrep v13.0.0 (/root/ripgrep)
error[E0308]: mismatched types
--> crates/core/args.rs:304:39
|
304 | cli::stdout_buffered_line(color)
| ------------------------- ^^^^^ expected `termcolor::ColorChoice`, found `ColorChoice`
| |
| arguments to this function are incorrect
|
= note: `ColorChoice` and `termcolor::ColorChoice` have similar names, but are actually distinct types
note: `ColorChoice` is defined in crate `termcolor`
--> /opt/rust/git/checkouts/termcolor-0e1edd74bd062d15/1679b36/src/lib.rs:207:1
|
207 | pub enum ColorChoice {
.....
Some errors have detailed explanations: E0277, E0308, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `ripgrep` (bin "rg") due to 19 previous errors
Some Tries:
cargo clean
- switch tag to 1.2.0
- use rev = "a4c5d51"