Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on 0.4.2 release #175

Closed
senden9 opened this issue Nov 22, 2021 · 4 comments · Fixed by #176
Closed

Build error on 0.4.2 release #175

senden9 opened this issue Nov 22, 2021 · 4 comments · Fixed by #176
Labels
bug Something isn't working

Comments

@senden9
Copy link

senden9 commented Nov 22, 2021

Describe the bug
The latest release (0.4.2) fails to build on my machine. Error:

error[E0599]: no method named `compat` found for struct `anyhow::Error` in the current scope
  --> /home/stefano/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-about-0.4.2/src/licenses.rs:21:24
   |
21 |         .map_err(|e| e.compat())
   |                        ^^^^^^ method not found in `anyhow::Error`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `cargo-about` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-about v0.4.2`, intermediate artifacts can be found at `/tmp/cargo-installGSR9B8`

To Reproduce
Try to install the latest cargo-about release with cargo install --version "=0.4.2" cargo-about

Expected behavior
cargo-about can be compiled successful.

Device:

  • OS: Ubuntu 20.04.3 LTS
  • Rust Compiler: rustc 1.56.1 (59eed8a2a 2021-11-01)

Additional Infos:
If I compile the latest version of this git repo (0c74659) cargo build as well as cargo build --release can compile. Maybe the version on crates.io is different 🤔 .

@senden9 senden9 added the bug Something isn't working label Nov 22, 2021
@senden9
Copy link
Author

senden9 commented Nov 22, 2021

Verbose build log created with cargo install --version "=0.4.2" --verbose cargo-about:
cargo-about-build.txt

@Jake-Shadle
Copy link
Member

Jake-Shadle commented Nov 22, 2021

No, it's just using a different version of anyhow, you can use --locked to use the exact Cargo.lock that was published (cargo install doesn't do this, which is a bit of a footgun). I will also publish a fix shortly.

@Jake-Shadle
Copy link
Member

Sorry I lied, not anyhow, this was due to a bump in askalono which replaced failure with anyhow.

@senden9
Copy link
Author

senden9 commented Nov 22, 2021

Ah, I didn't know that cargo install did not use the lock-file by default. This explains why a local cargo build is just fine.
Thank you for the explanation and the quick release of a "fixed" version @Jake-Shadle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants