Skip to content

Commit 8c1d6b2

Browse files
committed
Merge pull request duckdb#513 from paolobarbolini/opt
Optimize dependencies
2 parents 55f869c + 137cebe commit 8c1d6b2

File tree

5 files changed

+6
-32
lines changed

5 files changed

+6
-32
lines changed

Cargo.toml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,16 @@ categories = ["database"]
2222
duckdb = { version = "=1.3.0", path = "crates/duckdb" }
2323
libduckdb-sys = { version = "=1.3.0", path = "crates/libduckdb-sys" }
2424
duckdb-loadable-macros = { version = "=0.1.7", path = "crates/duckdb-loadable-macros" }
25-
autocfg = "1.0"
2625
bindgen = { version = "0.71.1", default-features = false }
27-
byteorder = "1.3"
2826
calamine = "0.22.0"
2927
cast = "0.3"
3028
cc = "1.0"
31-
chrono = "0.4.22"
32-
csv = "1.1"
29+
chrono = { version = "0.4.22", default-features = false, features = ["std", "clock"] }
3330
doc-comment = "0.3"
3431
fallible-iterator = "0.3"
3532
fallible-streaming-iterator = "0.1"
3633
flate2 = "1.0"
37-
hashlink = "0.9"
38-
lazy_static = "1.4"
34+
hashlink = "0.10"
3935
num = { version = "0.4", default-features = false }
4036
num-integer = "0.1.46"
4137
pkg-config = "0.3.24"
@@ -47,18 +43,15 @@ prettyplease = "0.2.20"
4743
proc-macro2 = "1.0.56"
4844
quote = "1.0.21"
4945
r2d2 = "0.8.9"
50-
rand = "0.8.3"
51-
regex = "1.6"
46+
rand = "0.9.0"
5247
rust_decimal = "1.14"
5348
serde = "1.0"
5449
serde_json = "1.0"
5550
smallvec = "1.6.1"
56-
strum = "0.25"
51+
strum = "0.27"
5752
syn = "2.0.15"
5853
tar = "0.4.38"
59-
tempdir = "0.3.7"
6054
tempfile = "3.1.0"
61-
unicase = "2.6.0"
6255
url = "2.1"
6356
uuid = "1.0"
6457
vcpkg = "0.2"

crates/duckdb/Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ libduckdb-sys = { workspace = true }
4545
hashlink = { workspace = true }
4646
chrono = { workspace = true, optional = true }
4747
serde_json = { workspace = true, optional = true }
48-
csv = { workspace = true, optional = true }
4948
url = { workspace = true, optional = true }
50-
lazy_static = { workspace = true, optional = true }
51-
byteorder = { workspace = true, features = ["i128"], optional = true }
5249
fallible-iterator = { workspace = true }
5350
fallible-streaming-iterator = { workspace = true }
5451
uuid = { workspace = true, optional = true }
@@ -68,12 +65,8 @@ num-integer = { workspace = true }
6865
[dev-dependencies]
6966
doc-comment = { workspace = true }
7067
tempfile = { workspace = true }
71-
lazy_static = { workspace = true }
72-
regex = { workspace = true }
7368
uuid = { workspace = true, features = ["v4"] }
74-
unicase = { workspace = true }
7569
rand = { workspace = true }
76-
tempdir = { workspace = true }
7770
polars-core = { workspace = true }
7871
pretty_assertions = { workspace = true }
7972
# criterion = "0.3"

crates/duckdb/src/r2d2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ mod test {
123123
use crate::types::Value;
124124
use std::{sync::mpsc, thread};
125125

126-
use tempdir::TempDir;
126+
use tempfile::TempDir;
127127

128128
#[test]
129129
fn test_basic() -> Result<()> {
@@ -203,7 +203,7 @@ mod test {
203203
#[test]
204204
fn test_error_handling() -> Result<()> {
205205
//! We specify a directory as a database. This is bound to fail.
206-
let dir = TempDir::new("r2d2-duckdb").expect("Could not create temporary directory");
206+
let dir = TempDir::with_prefix("r2d2-duckdb").expect("Could not create temporary directory");
207207
let dirpath = dir.path().to_str().unwrap();
208208
assert!(DuckdbConnectionManager::file(dirpath).is_err());
209209
Ok(())

crates/libduckdb-sys/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ loadable-extension = ["prettyplease", "quote", "syn"]
2929
[dependencies]
3030

3131
[build-dependencies]
32-
autocfg = { workspace = true }
3332
bindgen = { workspace = true, features = ["runtime"], optional = true }
3433
flate2 = { workspace = true }
3534
pkg-config = { workspace = true, optional = true }

crates/libduckdb-sys/openssl/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
clippy::unusual_byte_groupings
1919
)]
2020

21-
extern crate autocfg;
2221
#[cfg(feature = "openssl_bindgen")]
2322
extern crate bindgen;
2423
extern crate cc;
@@ -107,8 +106,6 @@ pub fn get_openssl_v2() -> Result<(Vec<PathBuf>, PathBuf), ()> {
107106
}
108107

109108
fn get_openssl() -> Result<(Vec<PathBuf>, PathBuf), ()> {
110-
check_rustc_versions();
111-
112109
check_ssl_kind()?;
113110

114111
let target = env::var("TARGET").unwrap();
@@ -166,14 +163,6 @@ fn get_openssl() -> Result<(Vec<PathBuf>, PathBuf), ()> {
166163
Ok((lib_dirs, include_dir))
167164
}
168165

169-
fn check_rustc_versions() {
170-
let cfg = autocfg::new();
171-
172-
if cfg.probe_rustc_version(1, 31) {
173-
println!("cargo:rustc-cfg=const_fn");
174-
}
175-
}
176-
177166
#[allow(clippy::let_and_return)]
178167
fn postprocess(include_dirs: &[PathBuf]) -> Version {
179168
let version = validate_headers(include_dirs);

0 commit comments

Comments
 (0)