mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
add a hack so bigdecimal can be the package name and the feature name
This commit is contained in:
parent
f2ca42256b
commit
43a72657f9
5 changed files with 10 additions and 6 deletions
4
.github/workflows/rust.yml
vendored
4
.github/workflows/rust.yml
vendored
|
@ -39,13 +39,13 @@ jobs:
|
|||
|
||||
# check w/deny warnings in sqlx-core: async-std
|
||||
- working-directory: sqlx-core
|
||||
run: cargo rustc --no-default-features --features 'bigdecimal_bigint ipnetwork chrono time uuid postgres mysql tls runtime-async-std' -- -D warnings --emit=metadata
|
||||
run: cargo rustc --no-default-features --features 'bigdecimal ipnetwork chrono time uuid postgres mysql tls runtime-async-std' -- -D warnings --emit=metadata
|
||||
|
||||
# check w/deny warnings in sqlx-core: tokio
|
||||
# `cargo rustc -p sqlx-core` ignores `--no-default-features` and builds with `runtime-async-std` anyway
|
||||
# https://github.com/rust-lang/cargo/issues/5364
|
||||
- working-directory: sqlx-core
|
||||
run: cargo rustc --no-default-features --features 'bigdecimal_bigint ipnetwork chrono time uuid postgres mysql tls runtime-tokio' -- -D warnings --emit=metadata
|
||||
run: cargo rustc --no-default-features --features 'bigdecimal ipnetwork chrono time uuid postgres mysql tls runtime-tokio' -- -D warnings --emit=metadata
|
||||
|
||||
# check w/deny warnings: async-std
|
||||
- run: cargo rustc --no-default-features --features 'bigdecimal ipnetwork chrono time uuid postgres mysql macros tls runtime-async-std' -- -D warnings --emit=metadata
|
||||
|
|
|
@ -46,7 +46,7 @@ mysql = [ "sqlx-core/mysql", "sqlx-macros/mysql" ]
|
|||
sqlite = [ "sqlx-core/sqlite", "sqlx-macros/sqlite" ]
|
||||
|
||||
# types
|
||||
bigdecimal = ["sqlx-core/bigdecimal_bigint", "sqlx-macros/bigdecimal"]
|
||||
bigdecimal = ["sqlx-core/bigdecimal", "sqlx-macros/bigdecimal"]
|
||||
chrono = [ "sqlx-core/chrono", "sqlx-macros/chrono" ]
|
||||
ipnetwork = [ "sqlx-core/ipnetwork", "sqlx-macros/ipnetwork" ]
|
||||
uuid = [ "sqlx-core/uuid", "sqlx-macros/uuid" ]
|
||||
|
|
|
@ -17,7 +17,7 @@ default = [ "runtime-async-std" ]
|
|||
unstable = []
|
||||
# we need a feature which activates `num-bigint` as well because
|
||||
# `bigdecimal` uses types from it but does not reexport (tsk tsk)
|
||||
bigdecimal_bigint = ["bigdecimal", "num-bigint"]
|
||||
bigdecimal = ["bigdecimal_", "num-bigint"]
|
||||
postgres = [ "md-5", "sha2", "base64", "sha-1", "rand", "hmac", "futures-channel/sink", "futures-util/sink" ]
|
||||
json = ["serde", "serde_json"]
|
||||
mysql = [ "sha-1", "sha2", "generic-array", "num-bigint", "base64", "digest", "rand" ]
|
||||
|
@ -31,7 +31,7 @@ async-native-tls = { version = "0.3.2", default-features = false, optional = tru
|
|||
async-std = { version = "1.5.0", features = [ "unstable" ], optional = true }
|
||||
async-stream = { version = "0.2.1", default-features = false }
|
||||
base64 = { version = "0.12.0", default-features = false, optional = true, features = [ "std" ] }
|
||||
bigdecimal = { version = "0.1.0", optional = true }
|
||||
bigdecimal_ = { version = "0.1.0", optional = true, package = "bigdecimal" }
|
||||
bitflags = { version = "1.2.1", default-features = false }
|
||||
byteorder = { version = "1.3.4", default-features = false, features = [ "std" ] }
|
||||
chrono = { version = "0.4.10", default-features = false, features = [ "clock" ], optional = true }
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
// #![warn(missing_docs)]
|
||||
|
||||
// HACK: Allow a feature name the same name as a dependency
|
||||
#[cfg(feature = "bigdecimal")]
|
||||
extern crate bigdecimal_ as bigdecimal;
|
||||
|
||||
mod runtime;
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -27,7 +27,7 @@ postgres = [ "sqlx/postgres" ]
|
|||
sqlite = [ "sqlx/sqlite" ]
|
||||
|
||||
# type
|
||||
bigdecimal = [ "sqlx/bigdecimal_bigint" ]
|
||||
bigdecimal = [ "sqlx/bigdecimal" ]
|
||||
chrono = [ "sqlx/chrono" ]
|
||||
time = [ "sqlx/time" ]
|
||||
ipnetwork = [ "sqlx/ipnetwork" ]
|
||||
|
|
Loading…
Reference in a new issue