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

Use workspace dependencies. #1035

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,38 @@ exclude = [

resolver = "2"

[workspace.dependencies]
prost = { version = "0.12.4", path = "prost", default-features = false }
prost-build = { path = "prost-build" }
prost-derive = { version = "0.12.4", path = "prost-derive" }
prost-types = { path = "prost-types", default-features = false }
protobuf = { path = "protobuf" }
tests = { path = "tests" }

anyhow = { version = "1.0.45", default-features = false }
bytes = { version = "1", default-features = false }
cfg-if = "1"
criterion = { version = "0.4", default-features = false }
diff = "0.1"
env_logger = { version = "0.10", default-features = false }
heck = ">=0.4, <=0.5"
itertools = { version = ">=0.10, <=0.12", default-features = false }
libfuzzer-sys = "0.4.7"
libz-sys = "1.1, <1.1.7"
log = "0.4.4"
multimap = { version = ">=0.8, <=0.10", default-features = false }
once_cell = "1.17.1"
petgraph = { version = "0.6", default-features = false }
prettyplease = "0.2"
proc-macro2 = "1"
proptest = "1"
pulldown-cmark = { version = "0.9.1", default-features = false }
pulldown-cmark-to-cmark = "10.0.1"
quote = "1"
rand = "0.8"
regex = { version = "1.8.1", default-features = false }
syn = "2"
tempfile = "3"

[profile.bench]
debug = true
11 changes: 6 additions & 5 deletions conformance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ publish = false
edition = "2018"

[dependencies]
bytes = "1"
env_logger = { version = "0.10", default-features = false }
prost = { path = "../prost" }
protobuf = { path = "../protobuf" }
tests = { path = "../tests" }
prost = { workspace = true, features = ["default"] }
protobuf.workspace = true
tests.workspace = true

bytes.workspace = true
env_logger.workspace = true
7 changes: 4 additions & 3 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ edition = "2018"
cargo-fuzz = true

[dependencies]
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
protobuf = { path = "../protobuf" }
tests = { path = "../tests" }
protobuf.workspace = true
tests.workspace = true

libfuzzer-sys.workspace = true

[[bin]]
name = "proto3"
Expand Down
5 changes: 3 additions & 2 deletions fuzz/afl/proto3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ name = "reproduce"
path = "src/reproduce.rs"

[dependencies]
protobuf.workspace = true
tests.workspace = true

afl = "0.4"
protobuf = { path = "../../protobuf/" }
tests = { path = "../../tests/" }
32 changes: 16 additions & 16 deletions prost-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ format = ["dep:prettyplease", "dep:syn"]
cleanup-markdown = ["dep:pulldown-cmark", "dep:pulldown-cmark-to-cmark"]

[dependencies]
bytes = { version = "1", default-features = false }
heck = { version = ">=0.4, <=0.5" }
itertools = { version = ">=0.10, <=0.12", default-features = false, features = ["use_alloc"] }
log = "0.4.4"
multimap = { version = ">=0.8, <=0.10", default-features = false }
petgraph = { version = "0.6", default-features = false }
prost = { version = "0.12.4", path = "../prost", default-features = false }
prost-types = { version = "0.12.4", path = "../prost-types", default-features = false }
tempfile = "3"
once_cell = "1.17.1"
regex = { version = "1.8.1", default-features = false, features = ["std", "unicode-bool"] }
bytes.workspace = true
heck.workspace = true
itertools = { workspace = true, features = ["use_alloc"] }
log.workspace = true
multimap.workspace = true
petgraph.workspace = true
prost = { workspace = true, features = ["default"] }
prost-types = { workspace = true, features = ["std"] }
tempfile.workspace = true
once_cell.workspace = true
regex = { workspace = true, features = ["std", "unicode-bool"] }

prettyplease = { version = "0.2", optional = true }
syn = { version = "2", features = ["full"], optional = true }
prettyplease = { workspace = true, optional = true }
syn = { workspace = true, features = ["full"], optional = true }

# These two must be kept in sync, used for `cleanup-markdown` feature.
pulldown-cmark = { version = "0.9.1", optional = true, default-features = false }
pulldown-cmark-to-cmark = { version = "10.0.1", optional = true }
pulldown-cmark = { workspace = true, optional = true }
pulldown-cmark-to-cmark = { workspace = true, optional = true }

[dev-dependencies]
env_logger = { version = "0.10", default-features = false }
env_logger.workspace = true
10 changes: 5 additions & 5 deletions prost-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rust-version = "1.70"
proc_macro = true

[dependencies]
anyhow = "1.0.1"
itertools = { version = ">=0.10, <=0.12", default-features = false, features = ["use_alloc"] }
proc-macro2 = "1"
quote = "1"
syn = { version = "2", features = [ "extra-traits" ] }
anyhow = { workspace = true, features = ["std"] }
itertools = { workspace = true, features = ["use_alloc"] }
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["extra-traits"] }
4 changes: 2 additions & 2 deletions prost-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default = ["std"]
std = ["prost/std"]

[dependencies]
prost = { version = "0.12.4", path = "../prost", default-features = false, features = ["prost-derive"] }
prost = { workspace = true, features = ["prost-derive"] }

[dev-dependencies]
proptest = "1"
proptest.workspace = true
14 changes: 7 additions & 7 deletions prost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ no-recursion-limit = []
std = []

[dependencies]
bytes = { version = "1", default-features = false }
prost-derive = { version = "0.12.4", path = "../prost-derive", optional = true }
bytes.workspace = true
prost-derive = { workspace = true, optional = true }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
env_logger = { version = "0.10", default-features = false }
log = "0.4"
proptest = "1"
rand = "0.8"
criterion.workspace = true
env_logger.workspace = true
log.workspace = true
proptest.workspace = true
rand.workspace = true

[[bench]]
name = "varint"
Expand Down
17 changes: 9 additions & 8 deletions protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ publish = false
edition = "2018"

[dependencies]
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }
prost = { workspace = true, features = ["default"] }
prost-types = { workspace = true, features = ["std"] }

[build-dependencies]
anyhow = "1.0.1"
prost-build = { path = "../prost-build" }
tempfile = "3"
prost-build.workspace = true

anyhow = { workspace = true, features = ["std"] }
tempfile.workspace = true

# With libz-sys `1.1.8` the msrv has been bumped to 1.54. Since, this dep
# is not a dep of the actual prost crates we will force cargo to not include
# the new version.
#
# https://github.com/rust-lang/libz-sys/issues/101
libz-sys = { version = "1.1, < 1.1.7", optional = true }
libz-sys = { workspace = true, optional = true }

[dev-dependencies]
criterion = { version = "0.4", default-features = false }
cfg-if = "1"
criterion.workspace = true
cfg-if.workspace = true

[lib]
# https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
Expand Down
31 changes: 17 additions & 14 deletions tests-2015/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,26 @@ path = "../tests/src/lib.rs"
[features]
default = ["edition-2015", "std"]
edition-2015 = []
std = []
std = ["anyhow/std", "prost-types/std", "prost/std"]

[dependencies]
anyhow = "1.0.1"
bytes = "1"
cfg-if = "1"
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }
protobuf = { path = "../protobuf" }
prost.workspace = true
prost-types.workspace = true
protobuf.workspace = true

anyhow.workspace = true
bytes.workspace = true
cfg-if.workspace = true

[dev-dependencies]
diff = "0.1"
prost-build = { path = "../prost-build" }
tempfile = "3"
prost-build.workspace = true

diff.workspace = true
tempfile.workspace = true

[build-dependencies]
cfg-if = "1"
env_logger = { version = "0.10", default-features = false }
prost-build = { path = "../prost-build" }
protobuf = { path = "../protobuf" }
prost-build.workspace = true
protobuf.workspace = true

cfg-if.workspace = true
env_logger.workspace = true
29 changes: 16 additions & 13 deletions tests-no-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,23 @@ path = "../tests/src/lib.rs"
# [1]: https://github.com/rust-lang/cargo/pull/8074

[dependencies]
anyhow = { version = "1.0.45", default-features = false }
bytes = { version = "1", default-features = false }
cfg-if = "1"
prost = { path = "../prost", default-features = false, features = ["derive"] }
prost-types = { path = "../prost-types", default-features = false }
protobuf = { path = "../protobuf" }
prost = { workspace = true, features = ["derive"] }
prost-types.workspace = true
protobuf = { workspace = true }

anyhow.workspace = true
bytes.workspace = true
cfg-if.workspace = true

[dev-dependencies]
diff = "0.1"
prost-build = { path = "../prost-build" }
tempfile = "3"
prost-build.workspace = true

diff.workspace = true
tempfile.workspace = true

[build-dependencies]
cfg-if = "1"
env_logger = { version = "0.10", default-features = false }
prost-build = { path = "../prost-build" }
protobuf = { path = "../protobuf" }
prost-build.workspace = true
protobuf.workspace = true

cfg-if.workspace = true
env_logger.workspace = true
29 changes: 16 additions & 13 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ build = "src/build.rs"

[features]
default = ["std"]
std = []
std = ["anyhow/std", "prost-types/std", "prost/std"]

[dependencies]
anyhow = "1.0.1"
prost.workspace = true
prost-types.workspace = true
protobuf.workspace = true

anyhow.workspace = true
# bytes = "1"
cfg-if = "1"
prost = { path = "../prost" }
prost-types = { path = "../prost-types" }
protobuf = { path = "../protobuf" }
cfg-if.workspace = true

[dev-dependencies]
diff = "0.1"
prost-build = { path = "../prost-build", features = ["cleanup-markdown"] }
tempfile = "3"
prost-build = { workspace = true, features = ["cleanup-markdown"] }

diff.workspace = true
tempfile.workspace = true

[build-dependencies]
cfg-if = "1"
env_logger = { version = "0.10", default-features = false }
prost-build = { path = "../prost-build" }
protobuf = { path = "../protobuf" }
prost-build.workspace = true
protobuf.workspace = true

cfg-if.workspace = true
env_logger.workspace = true
4 changes: 2 additions & 2 deletions tests/single-include/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ publish = false
license = "MIT"

[dependencies]
prost = { path = "../../prost" }
prost = { workspace = true, features = ["default"] }

[build-dependencies]
prost-build = { path = "../../prost-build" }
prost-build.workspace = true