Skip to content

Commit

Permalink
mysql_async, disable default features (#285) (#286)
Browse files Browse the repository at this point in the history
* mysql_async, disable default features (#285)

* mysql, add minimal feature instead of direct flate2 dependency (#285)

* reduce dependencies' features as much as possible (#285)

* Apply suggestions from code review

---------

Co-authored-by: jaumelopez <[email protected]>
Co-authored-by: João Oliveira <[email protected]>
  • Loading branch information
3 people authored Sep 10, 2023
1 parent cf6e3d6 commit 4326cbc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion refinery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default = []
rusqlite-bundled = ["refinery-core/rusqlite-bundled"]
rusqlite = ["refinery-core/rusqlite"]
postgres = ["refinery-core/postgres"]
mysql = ["refinery-core/mysql", "refinery-core/flate2"]
mysql = ["refinery-core/mysql"]
tokio-postgres = ["refinery-core/tokio-postgres"]
mysql_async = ["refinery-core/mysql_async"]
tiberius = ["refinery-core/tiberius"]
Expand Down
2 changes: 1 addition & 1 deletion refinery_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ path = "src/main.rs"
[features]
default = ["mysql", "postgresql", "sqlite-bundled", "mssql"]
postgresql = ["refinery-core/postgres"]
mysql = ["refinery-core/mysql", "refinery-core/flate2"]
mysql = ["refinery-core/mysql"]
sqlite = ["refinery-core/rusqlite"]
sqlite-bundled = ["sqlite", "refinery-core/rusqlite-bundled"]
mssql = ["refinery-core/tiberius-config", "tokio"]
Expand Down
19 changes: 8 additions & 11 deletions refinery_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ edition = "2018"
[features]
default = []
rusqlite-bundled = ["rusqlite", "rusqlite/bundled"]
tiberius = ["dep:tiberius", "futures"]
tiberius = ["dep:tiberius", "futures", "tokio", "tokio/net"]
tiberius-config = ["tiberius", "tokio", "tokio-util"]
tokio-postgres = ["dep:tokio-postgres", "tokio"]
mysql_async = ["dep:mysql_async", "tokio"]
tokio-postgres = ["dep:tokio-postgres", "tokio", "tokio/rt"]
mysql_async = ["dep:mysql_async"]

[dependencies]
async-trait = "0.1"
Expand All @@ -23,7 +23,7 @@ lazy_static = "1"
log = "0.4"
regex = "1"
serde = { version = "1", features = ["derive"] }
siphasher = "0.3"
siphasher = "1.0"
thiserror = "1"
toml = "0.7"
url = "2.0"
Expand All @@ -33,17 +33,14 @@ walkdir = "2.3.1"
rusqlite = { version = ">= 0.23, <= 0.29", optional = true }
postgres = { version = ">=0.17, <= 0.19", optional = true }
tokio-postgres = { version = ">= 0.5, <= 0.7", optional = true }
mysql = { version = ">= 21.0.0, <= 23", optional = true, default-features = false }
mysql_async = { version = ">= 0.28, <= 0.32", optional = true }
mysql = { version = ">= 21.0.0, <= 23", optional = true, default-features = false, features = ["minimal"] }
mysql_async = { version = ">= 0.28, <= 0.32", optional = true, default-features = false, features = ["minimal"] }
tiberius = { version = ">= 0.7, <= 0.12", optional = true, default-features = false }
tokio = { version = "1.0", features = ["full"], optional = true }
futures = { version = "0.3.16", optional = true }
tokio = { version = "1.0", optional = true }
futures = { version = "0.3.16", optional = true, features = ["async-await"] }
tokio-util = { version = "0.7.7", features = ["compat"], optional = true }
time = { version = "0.3.5", features = ["parsing", "formatting"] }

# Flate2 needs to be included for mysql to work
flate2 = { version = "1.0", default-features = false, features = [ "zlib" ], optional = true}

[dev-dependencies]
barrel = { git = "https://github.com/jxs/barrel", features = ["sqlite3", "pg", "mysql", "mssql"] }
tempfile = "3.1.0"
Expand Down

0 comments on commit 4326cbc

Please sign in to comment.