From fadef29c179fd70cd4d310ecb724c9207669b801 Mon Sep 17 00:00:00 2001 From: Jefffrey Date: Sun, 10 Aug 2025 10:52:22 +0900 Subject: [PATCH 1/2] Add rust-analyzer component to rust-toolchain.toml --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f772c0987b760..87d256d28cf14 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -20,4 +20,4 @@ [toolchain] channel = "1.88.0" -components = ["rustfmt", "clippy"] +components = ["rustfmt", "clippy", "rust-analyzer"] From 6776c952309ccbf1fb841e8d1170652741e697bc Mon Sep 17 00:00:00 2001 From: Jefffrey Date: Tue, 12 Aug 2025 17:14:51 +0900 Subject: [PATCH 2/2] Update dev env documentation about pinned rust version --- .../contributor-guide/development_environment.md | 10 ++++++---- rust-toolchain.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/source/contributor-guide/development_environment.md b/docs/source/contributor-guide/development_environment.md index cd1b8ea356427..53f2eb97c6fb2 100644 --- a/docs/source/contributor-guide/development_environment.md +++ b/docs/source/contributor-guide/development_environment.md @@ -75,18 +75,20 @@ Alternatively a binary release can be downloaded from the [Release Page](https:/ DataFusion is written in Rust and it uses a standard rust toolkit: +- `rustup update stable` DataFusion generally uses the latest stable release of Rust, though it may lag when new Rust toolchains release + - See which toolchain is currently pinned in the [`rust-toolchain.toml`](https://github.com/apache/datafusion/blob/main/rust-toolchain.toml) file + - This can cause issues such as not having the rust-analyzer component installed for the specified toolchain, in which case just install it manually, e.g. `rustup component add --toolchain 1.88 rust-analyzer` - `cargo build` - `cargo fmt` to format the code -- `cargo test` to test - etc. -Note that running `cargo test` requires significant memory resources, due to cargo running many tests in parallel by default. If you run into issues with slow tests or system lock ups, you can significantly reduce the memory required by instead running `cargo test -- --test-threads=1`. For more information see [this issue](https://github.com/apache/datafusion/issues/5347). - Testing setup: -- `rustup update stable` DataFusion uses the latest stable release of rust - `git submodule init` - `git submodule update --init --remote --recursive` +- `cargo test` to run tests + +Note that running `cargo test` requires significant memory resources, due to cargo running many tests in parallel by default. If you run into issues with slow tests or system lock ups, you can significantly reduce the memory required by instead running `cargo test -- --test-threads=1`. For more information see [this issue](https://github.com/apache/datafusion/issues/5347). Formatting instructions: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 87d256d28cf14..f772c0987b760 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -20,4 +20,4 @@ [toolchain] channel = "1.88.0" -components = ["rustfmt", "clippy", "rust-analyzer"] +components = ["rustfmt", "clippy"]