Steps
→ cargo new foo
Created binary (application) `foo` package
→ cd foo
→ cargo build --all --exclude bar
Compiling foo v0.1.0 (/tmp/tmp.F4Gdb3Jlcr/foo)
Finished dev [unoptimized + debuginfo] target(s) in 0.37s
Possible Solution(s)
Emit a warning that bar is not a known package in this workspace.
Notes
Output of cargo version: cargo 1.34.0-nightly (245818076 2019-01-27)