Skip to content

Commit

Permalink
Don't build driver for chrono/json/uuid/time/etc unless explicitly as…
Browse files Browse the repository at this point in the history
…ked (#328)

Cargo.toml files can use the "?" operator in their sub-dependencies to avoid
building the main dependency unless it is explicitly enabled by another feature

This uses that operator to avoid building the driver crate for
chrono/json/uuid/time/etc unless the driver crate is already enabled
explicitly

Fixes #327
  • Loading branch information
marti4d authored May 12, 2022
1 parent 3a80b09 commit 58e11cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ postgres-json = ["with-json", "postgres-types/with-serde_json-1"]
postgres-rust_decimal = ["with-rust_decimal", "rust_decimal/db-postgres"]
postgres-bigdecimal = ["with-bigdecimal"]
postgres-uuid = ["with-uuid", "postgres-types/with-uuid-0_8"]
postgres-array = ["postgres-types/array-impls", "sea-query-driver/postgres-array"]
postgres-array = ["postgres-types/array-impls", "sea-query-driver?/postgres-array"]
postgres-interval = ["proc-macro2", "quote"]
postgres-time = ["with-time", "postgres-types/with-time-0_2"]
rusqlite = ["sea-query-driver/rusqlite"]
sqlx-mysql = ["sea-query-driver/sqlx-mysql"]
sqlx-postgres = ["sea-query-driver/sqlx-postgres"]
sqlx-sqlite = ["sea-query-driver/sqlx-sqlite"]
thread-safe = []
with-chrono = ["chrono", "sea-query-driver/with-chrono"]
with-json = ["serde_json", "sea-query-driver/with-json"]
with-rust_decimal = ["rust_decimal", "sea-query-driver/with-rust_decimal"]
with-bigdecimal = ["bigdecimal", "sea-query-driver/with-bigdecimal"]
with-uuid = ["uuid", "sea-query-driver/with-uuid"]
with-time = ["time", "sea-query-driver/with-time"]
with-chrono = ["chrono", "sea-query-driver?/with-chrono"]
with-json = ["serde_json", "sea-query-driver?/with-json"]
with-rust_decimal = ["rust_decimal", "sea-query-driver?/with-rust_decimal"]
with-bigdecimal = ["bigdecimal", "sea-query-driver?/with-bigdecimal"]
with-uuid = ["uuid", "sea-query-driver?/with-uuid"]
with-time = ["time", "sea-query-driver?/with-time"]

[[test]]
name = "test-derive"
Expand Down

0 comments on commit 58e11cc

Please sign in to comment.