the-lean-crate / cargo-diet

A cargo-companion to become a 'lean crate' (a member of The Lean Crate Initiative)
https://github.com/the-lean-crate/criner
MIT License
154 stars 3 forks source link

errors are output as a debug representation of a binary array #2

Closed lopopolo closed 4 years ago

lopopolo commented 4 years ago
$ cargo diet
Error: LocateManifest(CargoExecution { stderr: [101, 114, 114, 111, 114, 58, 32, 110, 111, 32, 109, 97, 116, 99, 104, 105, 110, 103, 32, 112, 97, 99, 107, 97, 103, 101, 32, 110, 97, 109, 101, 100, 32, 96, 97, 114, 116, 105, 99, 104, 111, 107, 101, 45, 98, 97, 99, 107, 101, 110, 100, 96, 32, 102, 111, 117, 110, 100, 10, 108, 111, 99, 97, 116, 105, 111, 110, 32, 115, 101, 97, 114, 99, 104, 101, 100, 58, 32, 114, 101, 103, 105, 115, 116, 114, 121, 32, 96, 104, 116, 116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98, 46, 99, 111, 109, 47, 114, 117, 115, 116, 45, 108, 97, 110, 103, 47, 99, 114, 97, 116, 101, 115, 46, 105, 111, 45, 105, 110, 100, 101, 120, 96, 10, 114, 101, 113, 117, 105, 114, 101, 100, 32, 98, 121, 32, 112, 97, 99, 107, 97, 103, 101, 32, 96, 97, 114, 116, 105, 99, 104, 111, 107, 101, 32, 118, 48, 46, 49, 46, 48, 45, 112, 114, 101, 46, 48, 32, 40, 47, 85, 115, 101, 114, 115, 47, 108, 111, 112, 111, 112, 111, 108, 111, 47, 100, 101, 118, 47, 97, 114, 116, 105, 99, 104, 111, 107, 101, 47, 97, 114, 116, 105, 99, 104, 111, 107, 101, 41, 96, 10, 65, 115, 32, 97, 32, 114, 101, 109, 105, 110, 100, 101, 114, 44, 32, 121, 111, 117, 39, 114, 101, 32, 117, 115, 105, 110, 103, 32, 111, 102, 102, 108, 105, 110, 101, 32, 109, 111, 100, 101, 32, 40, 45, 45, 111, 102, 102, 108, 105, 110, 101, 41, 32, 119, 104, 105, 99, 104, 32, 99, 97, 110, 32, 115, 111, 109, 101, 116, 105, 109, 101, 115, 32, 99, 97, 117, 115, 101, 32, 115, 117, 114, 112, 114, 105, 115, 105, 110, 103, 32, 114, 101, 115, 111, 108, 117, 116, 105, 111, 110, 32, 102, 97, 105, 108, 117, 114, 101, 115, 44, 32, 105, 102, 32, 116, 104, 105, 115, 32, 101, 114, 114, 111, 114, 32, 105, 115, 32, 116, 111, 111, 32, 99, 111, 110, 102, 117, 115, 105, 110, 103, 32, 121, 111, 117, 32, 109, 97, 121, 32, 119, 105, 115, 104, 32, 116, 111, 32, 114, 101, 116, 114, 121, 32, 119, 105, 116, 104, 111, 117, 116, 32, 116, 104, 101, 32, 111, 102, 102, 108, 105, 110, 101, 32, 102, 108, 97, 103, 46, 10] })
Byron commented 4 years ago

The deserialized message is:

error: no matching package named artichoke-backend found
location searched: registry https://github.com/rust-lang/crates.io-index
required by package artichoke v0.1.0-pre.0 (/Users/lopopolo/dev/artichoke/artichoke)
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag
Byron commented 4 years ago

Thanks for posting! Artichoke is awesome, and I found the playground implementation particularly interesting as someone who has never delved in WASM yet.

That said, now error messages produced by cargo package are now human readable and a hint is provided on how to fix it (i.e. running cargo package by hand).

When that is done in case of Artichoke, it fails permanently with the following:

Error: error: all path dependencies must have a version specified when packaging.
dependency `artichoke-backend` does not specify a version.

To try fixing this, run 'cargo package' by hand before running 'cargo diet' again.

Thus I believe Artichoke can't run cargo diet unless packaging works. If you believe cargo diet could handle this situation (better), please let me know.

Version 1.1.2 contains the improvements mentioned above.

Byron commented 4 years ago

Even though I am closing the issue, I am happy to continue the conversation if there is anything else that could be done to make cargo diet more useful for the kind of projects you would like to use it with.