]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #5830 - Xanewok:executor-compile-mode, r=matklad
authorbors <bors@rust-lang.org>
Sun, 29 Jul 2018 20:56:35 +0000 (20:56 +0000)
committerbors <bors@rust-lang.org>
Sun, 29 Jul 2018 20:56:35 +0000 (20:56 +0000)
Add CompileMode to Executor callbacks

This came up when trying to fix https://github.com/rust-lang-nursery/rls/issues/876.

So currently in the RLS we recreate our own dep graph, where we store units with a key `(PackageId, TargetKind)`. This turned out to be not enough since
a) we can have multiple bin target kinds with different names (unrelated to this PR)
b) same package target kind (bin, lib) can be compiled regularly or including the test harness.
With this, we can distinguish these cases and properly rerun both regular compilation check and the one including unit tests.

Without this information we'd need to fall back on guessing whether the rustc invocation has `--test` but having this information makes it accurate and seems useful enough to add it to the callback arguments.

r? @alexcrichton or @matklad


Trivial merge