Skip to content

Commit

Permalink
Add everything into a workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
goffrie committed Mar 1, 2024
1 parent dabbe47 commit 7335c01
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 16 deletions.
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 <[email protected]>", "Nipunn Koorapati <[email protected]>", "Parker Timmerman <[email protected]>"]
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 <[email protected]>"]
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" }

0 comments on commit 7335c01

Please sign in to comment.