diff --git a/.github/workflows/rust-cubesql.yml b/.github/workflows/rust-cubesql.yml index 5c1f717d3296f..384bcc166be6e 100644 --- a/.github/workflows/rust-cubesql.yml +++ b/.github/workflows/rust-cubesql.yml @@ -5,6 +5,8 @@ on: paths: - '.github/workflows/rust-cubesql.yml' - 'packages/cubejs-backend-native/**' + - 'rust/cubenativeutils/**' + - 'rust/cubesqlplanner/**' - 'rust/cubesql/**' branches: - 'master' @@ -12,6 +14,8 @@ on: paths: - '.github/workflows/rust-cubesql.yml' - 'packages/cubejs-backend-native/**' + - 'rust/cubenativeutils/**' + - 'rust/cubesqlplanner/**' - 'rust/cubesql/**' jobs: @@ -43,6 +47,10 @@ jobs: run: cd rust/cubesql && cargo fmt --all -- --check - name: Lint Native run: cd packages/cubejs-backend-native && cargo fmt --all -- --check + - name: Lint cubenativeutils + run: cd rust/cubenativeutils && cargo fmt --all -- --check + - name: Lint cubesqlplanner + run: cd rust/cubesqlplanner && cargo fmt --all -- --check - name: Clippy CubeSQL run: cd rust/cubesql && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings - name: Clippy Native diff --git a/packages/cubejs-backend-native/Cargo.lock b/packages/cubejs-backend-native/Cargo.lock index 84af0eab3856a..2b03e9de8ee5e 100644 --- a/packages/cubejs-backend-native/Cargo.lock +++ b/packages/cubejs-backend-native/Cargo.lock @@ -768,20 +768,13 @@ dependencies = [ "async-trait", "convert_case", "cubesql", - "findshlibs", - "futures", "lazy_static", - "libc", "log", - "log-reroute", - "minijinja", "neon", - "once_cell", "regex", "serde", "serde_derive", "serde_json", - "simple_logger", "tokio", "uuid 0.8.2", ] diff --git a/rust/cubenativeutils/Cargo.lock b/rust/cubenativeutils/Cargo.lock index 159519ee1efa5..66b4d9227c5b0 100644 --- a/rust/cubenativeutils/Cargo.lock +++ b/rust/cubenativeutils/Cargo.lock @@ -662,22 +662,13 @@ dependencies = [ "async-trait", "convert_case", "cubesql", - "findshlibs", - "futures", "lazy_static", - "libc", "log", - "log-reroute", - "minijinja", "neon", - "once_cell", - "pyo3", - "pyo3-asyncio", "regex", "serde", "serde_derive", "serde_json", - "simple_logger", "tokio", "uuid 0.8.2", ] @@ -932,18 +923,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" -[[package]] -name = "findshlibs" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" -dependencies = [ - "cc", - "lazy_static", - "libc", - "winapi", -] - [[package]] name = "flatbuffers" version = "2.1.2" @@ -1193,12 +1172,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1401,12 +1374,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - [[package]] name = "instant" version = "0.1.13" @@ -1586,17 +1553,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "log-reroute" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741a3ba679a9a1d331319dda1c7d8f204e9f6760fd867e28576a45d17048bc02" -dependencies = [ - "arc-swap", - "log", - "once_cell", -] - [[package]] name = "lru" version = "0.12.3" @@ -1648,15 +1604,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374c335b2df19e62d4cb323103473cbc6510980253119180de862d89184f6a83" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -2115,12 +2062,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - [[package]] name = "postgres-protocol" version = "0.6.6" @@ -2246,94 +2187,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "pyo3" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" -dependencies = [ - "cfg-if 1.0.0", - "indoc", - "libc", - "memoffset", - "parking_lot", - "portable-atomic", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-asyncio" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea6b68e93db3622f3bb3bf363246cf948ed5375afe7abff98ccbdd50b184995" -dependencies = [ - "futures", - "once_cell", - "pin-project-lite", - "pyo3", - "pyo3-asyncio-macros", - "tokio", -] - -[[package]] -name = "pyo3-asyncio-macros" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c467178e1da6252c95c29ecf898b133f742e9181dca5def15dc24e19d45a39" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pyo3-build-config" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-macros" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 2.0.68", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "pyo3-build-config", - "quote", - "syn 2.0.68", -] - [[package]] name = "quinn" version = "0.11.2" @@ -2994,12 +2847,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - [[package]] name = "tempfile" version = "3.10.1" @@ -3358,12 +3205,6 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -[[package]] -name = "unindent" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" - [[package]] name = "untrusted" version = "0.9.0" diff --git a/rust/cubenativeutils/Cargo.toml b/rust/cubenativeutils/Cargo.toml index 2f7e911d5cf74..1e4e18574a8e2 100644 --- a/rust/cubenativeutils/Cargo.toml +++ b/rust/cubenativeutils/Cargo.toml @@ -14,20 +14,10 @@ serde_derive = "1.0.115" serde = "1.0.115" serde_json = "1.0.56" log = "0.4.21" -simple_logger = "1.7.0" uuid = { version = "0.8", features = ["v4"] } -once_cell = "1.10" -libc = "0.2" -findshlibs = "0.10.2" lazy_static = "1.4.0" regex = "1.3.9" convert_case = "0.6.0" -minijinja = { version = "1", features = ["json", "loader"] } -log-reroute = "0.1" -futures = "0.3.23" -# python -pyo3 = { version = "0.20.0", features = [], optional = true } -pyo3-asyncio = { version = "0.20.0", features = ["tokio-runtime", "attributes"], optional = true } [dependencies.neon] version = "=1" diff --git a/rust/cubenativeutils/rust-toolchain.toml b/rust/cubenativeutils/rust-toolchain.toml index 5e592ccdac8d5..ef8073e17f1d2 100644 --- a/rust/cubenativeutils/rust-toolchain.toml +++ b/rust/cubenativeutils/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-12-13" +channel = "nightly-2024-07-15" components = ["rustfmt", "rustc-dev", "clippy"] -profile = "minimal" \ No newline at end of file +profile = "minimal" diff --git a/rust/cubenativeutils/src/wrappers/object.rs b/rust/cubenativeutils/src/wrappers/object.rs index 439822c9d1613..f901ededed639 100644 --- a/rust/cubenativeutils/src/wrappers/object.rs +++ b/rust/cubenativeutils/src/wrappers/object.rs @@ -1,7 +1,6 @@ use super::inner_types::InnerTypes; use super::object_handle::NativeObjectHandle; use cubesql::CubeError; -use regex::Regex; pub trait NativeObject: Clone { fn get_context(&self) -> IT::Context; diff --git a/rust/cubesqlplanner/Cargo.lock b/rust/cubesqlplanner/Cargo.lock index 2118f9a1128bc..73e0b3b849fdc 100644 --- a/rust/cubesqlplanner/Cargo.lock +++ b/rust/cubesqlplanner/Cargo.lock @@ -694,20 +694,13 @@ dependencies = [ "async-trait", "convert_case", "cubesql", - "findshlibs", - "futures", "lazy_static", - "libc", "log", - "log-reroute", - "minijinja", "neon", - "once_cell", "regex", "serde", "serde_derive", "serde_json", - "simple_logger", "tokio", "uuid 0.8.2", ] @@ -984,18 +977,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" -[[package]] -name = "findshlibs" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" -dependencies = [ - "cc", - "lazy_static", - "libc", - "winapi", -] - [[package]] name = "flatbuffers" version = "2.1.2" @@ -1626,17 +1607,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "log-reroute" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741a3ba679a9a1d331319dda1c7d8f204e9f6760fd867e28576a45d17048bc02" -dependencies = [ - "arc-swap", - "log", - "once_cell", -] - [[package]] name = "lru" version = "0.12.3" diff --git a/rust/cubesqlplanner/cubesqlplanner/Cargo.toml b/rust/cubesqlplanner/cubesqlplanner/Cargo.toml index 0d09ff1098fcd..cbf1392dac058 100644 --- a/rust/cubesqlplanner/cubesqlplanner/Cargo.toml +++ b/rust/cubesqlplanner/cubesqlplanner/Cargo.toml @@ -21,6 +21,7 @@ chrono = "0.4.15" chrono-tz = "0.8.2" lazy_static = "1.4.0" regex = "1.3.9" + [dependencies.neon] version = "=1" default-features = false diff --git a/rust/cubesqlplanner/cubesqlplanner/src/plan/mod.rs b/rust/cubesqlplanner/cubesqlplanner/src/plan/mod.rs index 1a272abe88a4f..ad30f63233a83 100644 --- a/rust/cubesqlplanner/cubesqlplanner/src/plan/mod.rs +++ b/rust/cubesqlplanner/cubesqlplanner/src/plan/mod.rs @@ -8,7 +8,6 @@ pub mod query_plan; pub mod select; pub mod union; -use cubenativeutils::CubeError; pub use expression::Expr; pub use filter::{Filter, FilterItem}; pub use from::{From, FromSource}; diff --git a/rust/cubesqlplanner/rust-toolchain.toml b/rust/cubesqlplanner/rust-toolchain.toml index 5e592ccdac8d5..ef8073e17f1d2 100644 --- a/rust/cubesqlplanner/rust-toolchain.toml +++ b/rust/cubesqlplanner/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-12-13" +channel = "nightly-2024-07-15" components = ["rustfmt", "rustc-dev", "clippy"] -profile = "minimal" \ No newline at end of file +profile = "minimal"