Skip to content
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

chore(rust): Fix make pre-commit command #10205

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ smartstring = { version = "1" }
multiversion = "0.7"
either = "1.8"
strum_macros = "0.25"
version_check = "0.9.4"

[workspace.dependencies.arrow]
package = "arrow2"
Expand Down
3 changes: 3 additions & 0 deletions crates/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ polars-error = { version = "0.31.1", path = "../polars-error" }
serde = { version = "1", features = ["derive"], optional = true }
thiserror.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
dtype-decimal = ["atoi", "ethnum"]
dtype-array = []
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-arrow/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ wasm-timer = "0.2.5"
bincode = "1"
serde_json = "1"

[build-dependencies]
version_check = { workspace = true }

[package.metadata.docs.rs]
# not all because arrow 4.3 does not compile with simd
# all-features = true
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-core/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-lazy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pyo3 = { version = "0.19", optional = true }
rayon.workspace = true
smartstring.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
nightly = ["polars-core/nightly", "polars-pipe/nightly", "polars-plan/nightly"]
compile = ["polars-plan/compile"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-lazy/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
smartstring.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
simd = ["argminmax/nightly_simd"]
nightly = ["polars-utils/nightly"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-ops/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-pipe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ polars-utils = { version = "0.31.1", path = "../polars-utils", features = ["sysi
rayon.workspace = true
smartstring = { version = "1" }

[build-dependencies]
version_check = { workspace = true }

[features]
compile = ["crossbeam-channel", "crossbeam-queue"]
csv = ["polars-plan/csv", "polars-io/csv"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-pipe/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-plan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ serde = { version = "1", features = ["derive", "rc"], optional = true }
smartstring.workspace = true
strum_macros.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
# debugging utility
debugging = []
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-plan/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ rayon.workspace = true
smartstring.workspace = true
sysinfo = { version = "0.29", default-features = false, optional = true }

[build-dependencies]
version_check = { workspace = true }

[features]
bigidx = []
nightly = []
7 changes: 7 additions & 0 deletions crates/polars-utils/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
2 changes: 1 addition & 1 deletion crates/polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ ahash = "0.8"
rand = "0.8"

[build-dependencies]
version_check = "0.9.4"
version_check = { workspace = true }

[package.metadata.docs.rs]
# all-features = true
Expand Down
7 changes: 7 additions & 0 deletions py-polars/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.