crate2nix icon indicating copy to clipboard operation
crate2nix copied to clipboard

Doctests don't run

Open Fuuzetsu opened this issue 3 years ago • 1 comments

It seems that if a crate contains doctests, runTests doesn't run these while cargo test does.

I don't know what's involved in making this work.

Fuuzetsu avatar May 06 '21 04:05 Fuuzetsu

IIRC it is another compilation unit that we would have to target (through buildRustCrate). I looked at it at the time but I don't recall what it takes.

You could try adding the doctest feature to this expression: https://github.com/kolloch/crate2nix/blob/master/crate2nix/templates/nix/crate2nix/default.nix#L242

andir avatar May 06 '21 12:05 andir