[Pkg-rust-maintainers] debcargo bin packages FTBFS because they need dev-dependencies

Ximin Luo infinity0 at debian.org
Mon Feb 5 15:02:00 UTC 2018


Josh Triplett:
> On Mon, Jan 29, 2018 at 04:14:00AM +0000, Ximin Luo wrote:
>> Ximin Luo:
>>> [..] Should we just add dev-dependencies to Build-Depends in d/control? [..]
>>
>> Another option is to patch cargo not to check those dependencies, see
>>
>> https://github.com/rust-lang/cargo/issues/4988
>>
>> however my patch is (had to be) quite invasive...
> 
> I just followed up to that issue. Cargo definitely should *not* require
> dev-dependencies in `cargo install`.  This seems closely related to
> https://github.com/rust-lang/cargo/pull/3369 , in which I fixed `cargo
> install` to not require optional dependencies for non-enabled features.
> I would suggest checking the same `require_optional_deps` flag and not
> checking for dev-dependencies if false.
> 

Unfortunately this is not sufficient due to the internal wiring-up of resolve_ws_precisely. However it does let me omit half of what I had previously, so thanks for the tip - I was adding the equivalent functionality as an extra `force_dev_deps` flag to CompileOptions but re-using that existing field `require_optional_deps` from Workspace results in a smaller patch.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Pkg-rust-maintainers mailing list