Skip to content

Commit db0774a

Browse files
committed
Exclude protoc/test-protoc from default workspace
Because it depends on another crate binary, and Cargo does not expose binaries from dependencies. (rust-lang/cargo#4316)
1 parent c81c1f9 commit db0774a

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[workspace]
22
members = [
33
"protoc",
4-
"protoc/test-protoc",
4+
# Exclude test-protoc from the project, because it depends on binary
5+
#"protoc/test-protoc",
56
"protoc-rust",
67
"protobuf",
78
"protobuf-codegen",

ci/run.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,20 @@ protobuf-codegen-pure-test/test.sh
1919
protoc/test.sh
2020
cargo build --all --all-targets
2121

22+
check_protoc_crate() {
23+
# test depends on `protoc-gen-rust` binary, thus it cannot be a part of workspace
24+
cargo build -p protobuf-codegen
25+
(
26+
cd protoc/test-protoc
27+
cargo check
28+
)
29+
}
30+
2231
if [ -z "$ON_WINDOWS" ]; then
2332
cargo doc -p protobuf
2433
cargo doc -p protoc
34+
35+
check_protoc_crate
2536
fi
2637

2738
# vim: set ts=4 sw=4 et:

protoc/test-protoc/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[workspace]
2+
13
[package]
24
name = "test-protoc"
35
version = "0.0.0"

0 commit comments

Comments
 (0)