Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add everything into a Cargo workspace #172

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[workspace]
members = ["pb-jelly", "pb-jelly-gen", "pb-test", "pb-test/pb_test_gen", "examples/examples_gen"]
# Generated protos for examples aren't checked in, which interferes with the workspace
exclude = ["examples", "pb-test/gen/pb-jelly"]

# Override pb-jelly dependency for generated crates as well
[patch.crates-io]
pb-jelly = { path = "pb-jelly" }
3 changes: 0 additions & 3 deletions examples/examples_gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ publish = false
[dependencies]
#pb-jelly-gen = "0.0.16" # If copying this example - use this
pb-jelly-gen = { path = "../../pb-jelly-gen" }

[patch.crates-io]
pb-jelly = { path = "../../pb-jelly" }
4 changes: 0 additions & 4 deletions pb-jelly-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ walkdir = { version = "2", optional = true }
pb-jelly = { version = "0.0.16" }
lazy_static = "1.4.0"
indexmap = "2.0.2"

# Override pb-jelly dependency for generated crates as well
[patch.crates-io]
pb-jelly = { path = "../pb-jelly" }
1 change: 1 addition & 0 deletions pb-jelly-gen/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2637,6 +2637,7 @@ const CARGO_TOML_TEMPLATE: &str = concat!(
name = "{crate}"
version = "0.0.1"
edition = "2018"
publish = false

[dependencies]
{deps}
Expand Down
5 changes: 1 addition & 4 deletions pb-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "pb-test"
version = "0.1.0"
authors = ["Rajat Goel <rajat@dropbox.com>", "Nipunn Koorapati <nipunn@dropbox.com>", "Parker Timmerman <parkertimmerman@dropbox.com>"]
edition = "2018"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -26,7 +27,3 @@ serde_json = "1"
[features]
bench_prost = ["prost"]
bench_rust_protobuf = ["protobuf"]

# Override pb-jelly dependency for generated crates as well
[patch.crates-io]
pb-jelly = { path = "../pb-jelly" }
1 change: 1 addition & 0 deletions pb-test/gen/pb-jelly/proto_google/Cargo.toml.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name = "proto_google"
version = "0.0.1"
edition = "2018"
publish = false

[dependencies]
lazy_static = { version = "1.4.0" }
Expand Down
1 change: 1 addition & 0 deletions pb-test/gen/pb-jelly/proto_nopackage/Cargo.toml.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name = "proto_nopackage"
version = "0.0.1"
edition = "2018"
publish = false

[dependencies]
lazy_static = { version = "1.4.0" }
Expand Down
1 change: 1 addition & 0 deletions pb-test/gen/pb-jelly/proto_pbtest/Cargo.toml.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
name = "proto_pbtest"
version = "0.0.1"
edition = "2018"
publish = false

[dependencies]
bytes = { version = "1.0" }
Expand Down
6 changes: 1 addition & 5 deletions pb-test/pb_test_gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "examples_gen"
name = "pb_test_gen"
version = "0.1.0"
authors = ["Parker Timmerman <parkertimmerman@dropbox.com>"]
edition = "2018"
Expand All @@ -17,7 +17,3 @@ protobuf-codegen = { version = "3.3", optional = true }
[features]
bench_prost = ["prost-build"]
bench_rust_protobuf = ["protobuf-codegen"]

# Override pb-jelly dependency for generated crates as well
[patch.crates-io]
pb-jelly = { path = "../../pb-jelly" }
Loading