Skip to content

Optimize dependencies #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
15 changes: 4 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ categories = ["database"]
duckdb = { version = "=1.3.0", path = "crates/duckdb" }
libduckdb-sys = { version = "=1.3.0", path = "crates/libduckdb-sys" }
duckdb-loadable-macros = { version = "=0.1.7", path = "crates/duckdb-loadable-macros" }
autocfg = "1.0"
bindgen = { version = "0.71.1", default-features = false }
byteorder = "1.3"
calamine = "0.22.0"
cast = "0.3"
cc = "1.0"
chrono = "0.4.22"
csv = "1.1"
chrono = { version = "0.4.22", default-features = false, features = ["std", "clock"] }
doc-comment = "0.3"
fallible-iterator = "0.3"
fallible-streaming-iterator = "0.1"
flate2 = "1.0"
hashlink = "0.9"
lazy_static = "1.4"
hashlink = "0.10"
num = { version = "0.4", default-features = false }
num-integer = "0.1.46"
pkg-config = "0.3.24"
Expand All @@ -47,18 +43,15 @@ prettyplease = "0.2.20"
proc-macro2 = "1.0.56"
quote = "1.0.21"
r2d2 = "0.8.9"
rand = "0.8.3"
regex = "1.6"
rand = "0.9.0"
rust_decimal = "1.14"
serde = "1.0"
serde_json = "1.0"
smallvec = "1.6.1"
strum = "0.25"
strum = "0.27"
syn = "2.0.15"
tar = "0.4.38"
tempdir = "0.3.7"
tempfile = "3.1.0"
unicase = "2.6.0"
url = "2.1"
uuid = "1.0"
vcpkg = "0.2"
Expand Down
7 changes: 0 additions & 7 deletions crates/duckdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ libduckdb-sys = { workspace = true }
hashlink = { workspace = true }
chrono = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
csv = { workspace = true, optional = true }
url = { workspace = true, optional = true }
lazy_static = { workspace = true, optional = true }
byteorder = { workspace = true, features = ["i128"], optional = true }
fallible-iterator = { workspace = true }
fallible-streaming-iterator = { workspace = true }
uuid = { workspace = true, optional = true }
Expand All @@ -68,12 +65,8 @@ num-integer = { workspace = true }
[dev-dependencies]
doc-comment = { workspace = true }
tempfile = { workspace = true }
lazy_static = { workspace = true }
regex = { workspace = true }
uuid = { workspace = true, features = ["v4"] }
unicase = { workspace = true }
rand = { workspace = true }
tempdir = { workspace = true }
polars-core = { workspace = true }
pretty_assertions = { workspace = true }
# criterion = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions crates/duckdb/src/r2d2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ mod test {
use crate::types::Value;
use std::{sync::mpsc, thread};

use tempdir::TempDir;
use tempfile::TempDir;

#[test]
fn test_basic() -> Result<()> {
Expand Down Expand Up @@ -210,7 +210,7 @@ mod test {
#[test]
fn test_error_handling() -> Result<()> {
//! We specify a directory as a database. This is bound to fail.
let dir = TempDir::new("r2d2-duckdb").expect("Could not create temporary directory");
let dir = TempDir::with_prefix("r2d2-duckdb").expect("Could not create temporary directory");
let dirpath = dir.path().to_str().unwrap();
assert!(DuckdbConnectionManager::file(dirpath).is_err());
Ok(())
Expand Down
1 change: 0 additions & 1 deletion crates/libduckdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ loadable-extension = ["prettyplease", "quote", "syn"]
[dependencies]

[build-dependencies]
autocfg = { workspace = true }
bindgen = { workspace = true, features = ["runtime"], optional = true }
flate2 = { workspace = true }
pkg-config = { workspace = true, optional = true }
Expand Down
11 changes: 0 additions & 11 deletions crates/libduckdb-sys/openssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
clippy::unusual_byte_groupings
)]

extern crate autocfg;
#[cfg(feature = "openssl_bindgen")]
extern crate bindgen;
extern crate cc;
Expand Down Expand Up @@ -107,8 +106,6 @@ pub fn get_openssl_v2() -> Result<(Vec<PathBuf>, PathBuf), ()> {
}

fn get_openssl() -> Result<(Vec<PathBuf>, PathBuf), ()> {
check_rustc_versions();

check_ssl_kind()?;

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

fn check_rustc_versions() {
let cfg = autocfg::new();

if cfg.probe_rustc_version(1, 31) {
println!("cargo:rustc-cfg=const_fn");
}
}

#[allow(clippy::let_and_return)]
fn postprocess(include_dirs: &[PathBuf]) -> Version {
let version = validate_headers(include_dirs);
Expand Down
Loading