Skip to content

Commit

Permalink
Exclude protoc/test-protoc from default workspace
Browse files Browse the repository at this point in the history
Because it depends on another crate binary, and Cargo does not
expose binaries from dependencies.

(rust-lang/cargo#4316)
  • Loading branch information
stepancheg committed Dec 31, 2019
1 parent 86916b9 commit f64b967
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[workspace]
members = [
"protoc",
"protoc/test-protoc",
# Exclude test-protoc from the project, because it depends on binary
#"protoc/test-protoc",
"protoc-rust",
"protobuf",
"protobuf-fuzz",
Expand Down
11 changes: 11 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,21 @@ protobuf-codegen-pure-test/test.sh
protoc/test.sh
cargo build --all --all-targets

check_protoc_crate() {
# test depends on `protoc-gen-rust` binary, thus it cannot be a part of workspace
cargo build -p protobuf-codegen
(
cd protoc/test-protoc
cargo check
)
}

if [ -z "$ON_WINDOWS" ]; then
cargo doc -p protobuf
cargo doc -p protoc
cargo doc -p protoc-rust

check_protoc_crate
fi

# vim: set ts=4 sw=4 et:
2 changes: 2 additions & 0 deletions protoc/test-protoc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[workspace]

[package]
name = "test-protoc"
version = "0.0.0"
Expand Down

0 comments on commit f64b967

Please sign in to comment.