From 3a4c8d4a2a3c7de87316861fd1f1ab515e42cde3 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 18 Jan 2024 01:04:15 -0500 Subject: [PATCH] Consolidate dependency management using workspace Declaring all dependencies in one place ensures they are consistent across the project. Even though some dependencies might be used only once, in my experience it is far easier to keep them consistently in one place, than to have a separation between shared vs non-shared ones, and also to move them once something becomes shared. Easier to just keep everything together and consistent. --- Cargo.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++ fuzz/Cargo.toml | 18 +++++++-------- lib/oxrdf/Cargo.toml | 2 +- testsuite/Cargo.toml | 2 +- 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 91b1b7ec..38537545 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,61 @@ url = "2.4" wasm-bindgen = "0.2.83" zstd = ">=0.12, <0.14" +[workspace.dependencies] +anyhow = "1.0.72" +arbitrary = { version = "1.3", features = ["derive"] } +assert_cmd = "2.0" +assert_fs = "1.0" +bindgen = ">=0.60, <0.70" +cc = { version = "1.0.73", features = ["parallel"] } +clap = { version = "4.0", features = ["derive"] } +codspeed-criterion-compat = "2.3.3" +console_error_panic_hook = "0.1.7" +digest = "0.10" +escargot = "0.5" +flate2 = "1.0" +getrandom = "0.2.8" +hex = "0.4" +js-sys = "0.3.60" +json-event-parser = "0.2.0-alpha.2" +libc = "0.2.147" +libfuzzer-sys = "0.4" +md-5 = "0.10" +memchr = "2.5" +oxhttp = "0.2.0-alpha.3" +oxilangtag = "0.1" +oxiri = "0.2.3-alpha.1" +peg = "0.8" +pkg-config = "0.3.25" +predicates = ">=2.0, <4.0" +pyo3 = { version = "0.20.1", features = ["extension-module"] } +quick-xml = ">=0.29, <0.32" +rand = "0.8" +rayon-core = "1.11" +regex = "1.7" +sha1 = "0.10" +sha2 = "0.10" +siphasher = ">=0.3, <2.0" +text-diff = "0.4" +time = { version = "0.3", features = ["formatting"] } +tokio = "1.29" +url = "2.4" +wasm-bindgen = "0.2.83" +zstd = ">=0.12, <0.14" + +# Internal dependencies +oxigraph = { path = "lib", version = "0.4.0-alpha.3" } +oxrdf = { path = "lib/oxrdf", version = "0.2.0-alpha.1" } +oxrdfio = { path = "lib/oxrdfio", version = "0.1.0-alpha.2" } +oxrdfxml = { path = "lib/oxrdfxml", version = "0.1.0-alpha.1" } +oxrocksdb-sys = { path = "oxrocksdb-sys", version = "0.4.0-alpha.3" } +oxsdatatypes = { path = "lib/oxsdatatypes", version = "0.2.0-alpha.1" } +oxttl = { path = "lib/oxttl", version = "0.1.0-alpha.2" } +sparesults = { path = "lib/sparesults", version = "0.2.0-alpha.1" } +spargebra = { path = "lib/spargebra", version = "0.3.0-alpha.1" } +sparopt = { path = "lib/sparopt", version = "0.1.0-alpha.1" } +sparql-smith = { path = "lib/sparql-smith" } + [workspace.lints.rust] absolute_paths_not_starting_with_crate = "warn" elided_lifetimes_in_paths = "warn" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 8ce8daf3..ae8ee0cc 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -8,15 +8,15 @@ edition = "2021" cargo-fuzz = true [dependencies] -anyhow = "1.0.72" -libfuzzer-sys = "0.4" -oxigraph = { path = "../lib/oxigraph" } -oxrdf = { path = "../lib/oxrdf", features = ["rdf-star"] } -oxrdfxml = { path = "../lib/oxrdfxml" } -oxttl = { path = "../lib/oxttl", features = ["rdf-star"] } -sparesults = { path = "../lib/sparesults", features = ["rdf-star"] } -spargebra = { path = "../lib/spargebra", features = ["rdf-star", "sep-0006"] } -sparql-smith = { path = "../lib/sparql-smith", features = ["sep-0006"] } +anyhow.workspace = true +libfuzzer-sys.workspace = true +oxigraph.workspace = true +oxrdf = { workspace = true, features = ["rdf-star"] } +oxrdfxml.workspace = true +oxttl = { workspace = true, features = ["rdf-star"] } +sparesults = { workspace = true, features = ["rdf-star"] } +spargebra = { workspace = true, features = ["rdf-star", "sep-0006"] } +sparql-smith = { workspace = true, features = ["sep-0006"] } [profile.release] codegen-units = 1 diff --git a/lib/oxrdf/Cargo.toml b/lib/oxrdf/Cargo.toml index 5acda6b6..90b2bb12 100644 --- a/lib/oxrdf/Cargo.toml +++ b/lib/oxrdf/Cargo.toml @@ -28,4 +28,4 @@ workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] \ No newline at end of file +rustdoc-args = ["--cfg", "docsrs"] diff --git a/testsuite/Cargo.toml b/testsuite/Cargo.toml index 6218880d..1302d710 100644 --- a/testsuite/Cargo.toml +++ b/testsuite/Cargo.toml @@ -28,4 +28,4 @@ workspace = true [[bench]] name = "parser" -harness = false \ No newline at end of file +harness = false