docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

My crate build fails and the build error message is not very informative

Open wada314 opened this issue 1 year ago • 2 comments

Crate name

protoc-plugin-by-closure

Build failure link

https://docs.rs/crate/protoc-plugin-by-closure/0.1.3/builds/1281496

Additional details

Hello! As title says, my relatively-trivial crate is failing to build in docs.rs and the error message is not very useful. My crate is just a single lib.rs src file... Just one special thing I can imagine is that it's depending on a cargo unstable feature bindeps so the crate is containing .cargo/config.toml file with a simple content:

[unstable]
bindeps = true

and the crate is depending on an binary-only carte protoc-plugin-bin.

My repository dir

thanks in advance,

wada314 avatar Jul 04 '24 17:07 wada314

the actual error is:

error: failed to parse manifest at /home/cratesfyi/workspace-builder/builds/protoc-plugin-by-closure-0.1.3/source Cargo.toml Caused by: artifact = … requires -Z bindeps (protoc-plugin-bin)

( I need to check why this part is missing in the logs )

syphar avatar Jul 10 '24 06:07 syphar

short research result:

for these pre-build errors we just render the error variant we get, in this case rustwide::CommandError, which only contains the status code.

We additionally need to collect & show the output in the cases the error is coming from cargo commands.

( not sure if we should add this to rustwide, or use LogStorage from inside docs.rs)

syphar avatar Aug 13 '24 13:08 syphar

https://github.com/rust-lang/docs.rs/pull/2635 should help with this

syphar avatar Oct 18 '24 14:10 syphar