[Pkg-rust-maintainers] Bug#880690: Bug#880690: dh-cargo: should build and test library

Josh Triplett josh at joshtriplett.org
Sat Nov 4 09:17:09 UTC 2017


tags 880690 + confirmed
severity 880690 wishlist
thanks

On Fri, Nov 03, 2017 at 10:05:31PM +0100, Jonas Smedegaard wrote:
> Package: dh-cargo
> Version: 2
> Severity: important
> 
> dh-cargo registers as a _build_ system, yet does not build the library
> nor does it execute its testsuite.
> 
> I understand that Rust packaging policy mandates libraries should be
> _installed_ only as source, but that does not preclude ensuring that it
> properly builds and passes its testsuite.

This is something we should work towards, and may be able to do on a
case-by-case basis, but we cannot run crate testsuites by default.
*Many* crates are not capable of running their testsuites given only the
contents of the .crate file; some require the full contents of the
upstream git repository (including non-trivial test data), or
non-standard tools, or git submodules, or any number of other things.

Beyond that, even if the testsuite could be run with only those files,
neither "cargo test" nor "cargo build" can be reliably be run from the
unpacked .crate, because the unpacked crate may incorporate things like
workspaces. Only "cargo install cratename" (with a directory registry)
is expected to work from a .crate, and only from a binary package, not a
library package.

I'm tagging this as confirmed because we *do* want to do it at some
point, and marking it as wishlist for the feature of allowing a package
to opt in to running the testsuite in cases where it is known to work.



More information about the Pkg-rust-maintainers mailing list