Skip to content

Commit

Permalink
feat: unify dependencies' versions, moving them to workspace (#4718)
Browse files Browse the repository at this point in the history
* chore: unify serde_json versions

* chore: move enumflags2 to workspace deps

* chore: move uuid + async-trait to workspace deps

* chore: unify chrono versions

* chore: unify url versions

* chore: move url dep to workspace

* chore: update indexmap, replace deprecated ".remove()" with ".swap_remove()"

* chore: fix compilation

* chore: move tracing to workspace deps
  • Loading branch information
jkomyno authored Feb 14, 2024
1 parent 9376880 commit 58fef65
Show file tree
Hide file tree
Showing 46 changed files with 236 additions and 209 deletions.
151 changes: 86 additions & 65 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ members = [
]

[workspace.dependencies]
async-trait = { version = "0.1.77" }
enumflags2 = { version = "0.7", features = ["serde"] }
psl = { path = "./psl/psl" }
serde_json = { version = "1", features = ["float_roundtrip", "preserve_order"] }
serde = { version = "1", features = ["derive"] }
Expand All @@ -47,9 +49,11 @@ tokio = { version = "1.25", features = [
"parking_lot",
"time",
] }
chrono = { version = "0.4", features = ["serde"] }
user-facing-errors = { path = "./libs/user-facing-errors" }
uuid = { version = "1", features = ["serde"] }
uuid = { version = "1", features = ["serde", "v4"] }
indoc = "2.0.1"
indexmap = { version = "2.2.2", features = ["serde"] }
itertools = "0.12"
connection-string = "0.2"
napi = { version = "2.15.1", default-features = false, features = [
Expand All @@ -59,13 +63,16 @@ napi = { version = "2.15.1", default-features = false, features = [
] }
napi-derive = "2.15.0"
js-sys = { version = "0.3" }
rand = { version = "0.8" }
serde_repr = { version = "0.1.17" }
serde-wasm-bindgen = { version = "0.5" }
tracing = { version = "0.1" }
tsify = { version = "0.4.5" }
wasm-bindgen = { version = "0.2.89" }
wasm-bindgen-futures = { version = "0.4" }
wasm-rs-dbg = { version = "0.1.2" }
wasm-bindgen-test = { version = "0.3.0" }
url = { version = "2.5.0" }

[workspace.dependencies.quaint]
path = "quaint"
Expand Down
2 changes: 1 addition & 1 deletion libs/prisma-value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.1.0"

[dependencies]
base64 = "0.13"
chrono = { version = "0.4", features = ["serde"] }
chrono.workspace = true
once_cell = "1.3"
regex = "1.2"
bigdecimal = "0.3"
Expand Down
6 changes: 3 additions & 3 deletions libs/query-engine-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ edition = "2021"

[dependencies]
thiserror = "1"
url = "2"
url.workspace = true
query-connector = { path = "../../query-engine/connectors/query-connector" }
query-core = { path = "../../query-engine/core" }
user-facing-errors = { path = "../user-facing-errors" }
serde_json.workspace = true
serde.workspace = true
connection-string.workspace = true
psl.workspace = true
async-trait = "0.1"
tracing = "0.1"
async-trait.workspace = true
tracing.workspace = true
tracing-subscriber = { version = "0.3" }
tracing-futures = "0.2"
tracing-opentelemetry = "0.17.3"
Expand Down
8 changes: 4 additions & 4 deletions libs/test-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ edition = "2021"
anyhow = "1.0.26"
colored = "2"
structopt = "0.3.8"
enumflags2 = "0.7"
enumflags2.workspace = true
dmmf = { path = "../../query-engine/dmmf" }
schema-core = { path = "../../schema-engine/core" }
schema-connector = { path = "../../schema-engine/connectors/schema-connector" }
psl.workspace = true
tokio.workspace = true
serde_json = { version = "1.0", features = ["float_roundtrip"] }
tracing = "0.1"
serde_json.workspace = true
tracing.workspace = true
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-error = "0.2"
async-trait = "0.1.52"
async-trait.workspace = true
6 changes: 3 additions & 3 deletions libs/test-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ edition = "2021"
[dependencies]
connection-string.workspace = true
dissimilar = "1.0.3"
enumflags2 = "0.7"
enumflags2.workspace = true
once_cell = "1.3.1"
tokio = { workspace = true, optional = true }
tracing = "0.1"
tracing.workspace = true
tracing-error = "0.2"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
url = "2.1.1"
url.workspace = true
quaint = { workspace = true, optional = true }

[features]
Expand Down
2 changes: 1 addition & 1 deletion libs/user-facing-errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ user-facing-error-macros = { path = "../user-facing-error-macros" }
serde_json.workspace = true
serde.workspace = true
backtrace = "0.3.40"
tracing = "0.1"
tracing.workspace = true
indoc.workspace = true
itertools.workspace = true
quaint = { path = "../../quaint", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion prisma-fmt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ serde.workspace = true
indoc.workspace = true
lsp-types = "0.91.1"
log = "0.4.14"
enumflags2 = "0.7"
enumflags2.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
structopt = "0.3"
Expand Down
5 changes: 2 additions & 3 deletions psl/parser-database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ edition = "2021"
[dependencies]
diagnostics = { path = "../diagnostics" }
schema-ast = { path = "../schema-ast" }

indexmap.workspace = true
enumflags2.workspace = true
either = "1.6.1"
enumflags2 = "0.7"
indexmap = "1.8.0"
rustc-hash = "1.1.0"
6 changes: 3 additions & 3 deletions psl/psl-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ prisma-value = { path = "../../libs/prisma-value" }
schema-ast = { path = "../schema-ast" }

bigdecimal = "0.3"
chrono = { version = "0.4.6", default_features = false }
chrono = { workspace = true }
connection-string.workspace = true
itertools.workspace = true
once_cell = "1.3.1"
regex = "1.3.7"
serde.workspace = true
serde_json.workspace = true
enumflags2 = "0.7"
enumflags2.workspace = true
indoc.workspace = true
either = "1.8.1"
hex = "0.4"

# For the connector API.
lsp-types = "0.91.1"
url = "2.2.1"
url.workspace = true
12 changes: 6 additions & 6 deletions quaint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,29 @@ fmt-sql = ["sqlformat"]
[dependencies]
connection-string = "0.2"
percent-encoding = "2"
tracing = "0.1"
tracing.workspace = true
tracing-core = "0.1"
async-trait = "0.1"
async-trait.workspace = true
thiserror = "1.0"
num_cpus = "1.12"
metrics = "0.18"
futures = "0.3"
url = "2.1"
url.workspace = true
hex = "0.4"
itertools.workspace = true

either = { version = "1.6" }
base64 = { version = "0.12.3" }
chrono = { version = "0.4", default-features = false, features = ["serde"] }
chrono.workspace = true
lru-cache = { version = "0.1", optional = true }
serde_json = { version = "1.0.48", features = ["float_roundtrip"] }
serde_json.workspace = true
native-tls = { version = "0.2", optional = true }
bit-vec = { version = "0.6.1", optional = true }
bytes = { version = "1.0", optional = true }
mobc = { version = "0.8", optional = true }
serde = { version = "1.0", optional = true }
sqlformat = { version = "0.2.3", optional = true }
uuid = { version = "1", features = ["v4"] }
uuid.workspace = true
crosstarget-utils = { path = "../libs/crosstarget-utils" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion quaint/quaint-test-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
once_cell = "1.3.1"
bitflags = "1.2.1"
async-trait = "0.1"
async-trait.workspace = true
names = "0.11"
tokio = { version = "1.0", features = ["rt-multi-thread"] }
quaint = { path = "..", features = ["all"] }
4 changes: 2 additions & 2 deletions query-engine/black-box-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ query-engine-tests = { path = "../connector-test-kit-rs/query-engine-tests" }
query-tests-setup = { path = "../connector-test-kit-rs/query-tests-setup" }
reqwest = "0.11"
anyhow = "1.0"
serde_json = "1.0"
serde_json.workspace = true
indoc.workspace = true
tokio.workspace = true
user-facing-errors.workspace = true
insta = "1.7.1"
enumflags2 = "0.7"
enumflags2.workspace = true
query-engine-metrics = {path = "../metrics"}
regex = "1.9.3"
4 changes: 2 additions & 2 deletions query-engine/connector-test-kit-rs/qe-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ mongodb-client = { path = "../../../libs/mongodb-client" }
schema-core = { path = "../../../schema-engine/core" }
sql-schema-connector = { path = "../../../schema-engine/connectors/sql-schema-connector" }
test-setup = { path = "../../../libs/test-setup" }
enumflags2.workspace = true

connection-string = "*"
enumflags2 = "*"
mongodb = "2.8.0"
url = "2"
url.workspace = true
once_cell = "1.17.0"
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ name = "query-engine-tests"
version = "0.1.0"

[dependencies]
enumflags2 = "0.7"
enumflags2.workspace = true
anyhow = "1.0"
serde_json = "1.0"
serde_json.workspace = true
query-test-macros = { path = "../query-test-macros" }
query-tests-setup = { path = "../query-tests-setup" }
indoc.workspace = true
tracing = "0.1"
tracing.workspace = true
tracing-futures = "0.2"
colored = "2"
chrono = "0.4"
chrono.workspace = true
psl.workspace = true
base64 = "0.13"
uuid.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ query-engine = { path = "../../query-engine" }
psl.workspace = true
user-facing-errors = { path = "../../../libs/user-facing-errors" }
thiserror = "1.0"
async-trait = "0.1"
async-trait.workspace = true
nom = "7.1"
itertools.workspace = true
regex = "1"
serde.workspace = true
tracing = "0.1"
tracing.workspace = true
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
tracing-error = "0.2"
colored = "2"
indoc.workspace = true
enumflags2 = "0.7"
enumflags2.workspace = true
hyper = { version = "0.14", features = ["full"] }
indexmap = { version = "1.0", features = ["serde-1"] }
indexmap.workspace = true
query-engine-metrics = { path = "../../metrics" }
quaint.workspace = true
jsonrpc-core = "17"
Expand Down
10 changes: 5 additions & 5 deletions query-engine/connectors/mongodb-query-connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ version = "0.1.0"

[dependencies]
anyhow = "1.0"
async-trait = "0.1"
async-trait.workspace = true
bigdecimal = "0.3"
# bson = {version = "1.1.0", features = ["decimal128"]}
futures = "0.3"
itertools.workspace = true
mongodb = "2.8.0"
bson = { version = "2.4.0", features = ["chrono-0_4", "uuid-1"] }
rand = "0.7"
rand.workspace = true
regex = "1"
serde_json = { version = "1.0", features = ["float_roundtrip"] }
serde_json.workspace = true
thiserror = "1.0"
tokio.workspace = true
tracing = "0.1"
tracing.workspace = true
tracing-futures = "0.2"
uuid.workspace = true
indexmap = "1.7"
indexmap.workspace = true
query-engine-metrics = { path = "../../metrics" }
cuid = { git = "https://github.com/prisma/cuid-rust", branch = "wasm32-support" }
derive_more = "0.99.17"
Expand Down
8 changes: 4 additions & 4 deletions query-engine/connectors/query-connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = "0.1.0"

[dependencies]
anyhow = "1.0"
async-trait = "0.1.31"
chrono = {version = "0.4", features = ["serde"]}
async-trait.workspace = true
chrono.workspace = true
futures = "0.3"
itertools.workspace = true
query-structure = {path = "../../query-structure"}
Expand All @@ -15,5 +15,5 @@ serde.workspace = true
serde_json.workspace = true
thiserror = "1.0"
user-facing-errors = {path = "../../../libs/user-facing-errors", features = ["sql"]}
uuid = "1"
indexmap = "1.7"
uuid.workspace = true
indexmap.workspace = true
2 changes: 1 addition & 1 deletion query-engine/connectors/query-connector/src/write_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl WriteArgs {
}

pub fn take_field_value(&mut self, field: &str) -> Option<WriteOperation> {
self.args.remove(field)
self.args.swap_remove(field)
}

pub fn keys(&self) -> Keys<DatasourceFieldName, WriteOperation> {
Expand Down
8 changes: 4 additions & 4 deletions query-engine/connectors/sql-query-connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ driver-adapters = []
[dependencies]
psl.workspace = true
anyhow = "1.0"
async-trait = "0.1"
async-trait.workspace = true
bigdecimal = "0.3"
futures = "0.3"
itertools.workspace = true
once_cell = "1.3"
rand = "0.7"
serde_json = { version = "1.0", features = ["float_roundtrip"] }
rand.workspace = true
serde_json.workspace = true
thiserror = "1.0"
tokio = { version = "1.0", features = ["macros", "time"] }
tracing = "0.1"
tracing.workspace = true
tracing-futures = "0.2"
uuid.workspace = true
opentelemetry = { version = "0.17", features = ["tokio"] }
Expand Down
12 changes: 6 additions & 6 deletions query-engine/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ metrics = ["query-engine-metrics"]
graphql-protocol = []

[dependencies]
async-trait = "0.1"
async-trait.workspace = true
bigdecimal = "0.3"
chrono = "0.4"
chrono.workspace = true
connection-string.workspace = true
connector = { path = "../connectors/query-connector", package = "query-connector" }
crossbeam-channel = "0.5.6"
psl.workspace = true
futures = "0.3"
indexmap = { version = "1.7", features = ["serde-1"] }
indexmap.workspace = true
itertools.workspace = true
once_cell = "1"
petgraph = "0.4"
Expand All @@ -29,14 +29,14 @@ serde.workspace = true
serde_json.workspace = true
thiserror = "1.0"
tokio = { version = "1.0", features = ["macros", "time"] }
tracing = { version = "0.1", features = ["attributes"] }
tracing = { workspace = true, features = ["attributes"] }
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-opentelemetry = "0.17.4"
user-facing-errors = { path = "../../libs/user-facing-errors" }
uuid = "1"
uuid.workspace = true
cuid = { git = "https://github.com/prisma/cuid-rust", branch = "wasm32-support" }
schema = { path = "../schema" }
crosstarget-utils = { path = "../../libs/crosstarget-utils" }
lru = "0.7.7"
enumflags2 = "0.7"
enumflags2.workspace = true
Loading

0 comments on commit 58fef65

Please sign in to comment.