From a4faeb7259a718b0b15867e92a691b2201006eca Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 13 Feb 2025 15:32:44 -0500 Subject: [PATCH 1/3] Specify rust toolchain explicitly, document how to change it --- docs/source/contributor-guide/howtos.md | 6 ++++++ rust-toolchain.toml | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/docs/source/contributor-guide/howtos.md b/docs/source/contributor-guide/howtos.md index e406804caa44..556242751ff4 100644 --- a/docs/source/contributor-guide/howtos.md +++ b/docs/source/contributor-guide/howtos.md @@ -19,6 +19,12 @@ # HOWTOs +## How to update the version of Rust used in CI tests + +- Make a PR to update the [rust-toolchain] file in the root of the repository: + +[rust-toolchain]: https://github.com/apache/datafusion/blob/main/rust-toolchain.toml + ## How to add a new scalar function Below is a checklist of what you need to do to add a new scalar function to DataFusion: diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000000..bd764d201018 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This file specifies the default version of Rust used +# to compile this workspace and run CI jobs. + +[toolchain] +channel = "1.84.1" +components = ["rustfmt", "clippy"] From 55113889e9080c2c832fbe219541f63bc3913dea Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 13 Feb 2025 15:59:29 -0500 Subject: [PATCH 2/3] test downgrade toolchain --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bd764d201018..46e8ac2f28bf 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -19,5 +19,5 @@ # to compile this workspace and run CI jobs. [toolchain] -channel = "1.84.1" +channel = "1.84.0" components = ["rustfmt", "clippy"] From 9084f121b95192aac64aac827f4135d551b2b6b0 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 13 Feb 2025 16:03:30 -0500 Subject: [PATCH 3/3] use 1.83 which would fail clippy --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 46e8ac2f28bf..e5573e25cfb6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -19,5 +19,5 @@ # to compile this workspace and run CI jobs. [toolchain] -channel = "1.84.0" +channel = "1.83.0" components = ["rustfmt", "clippy"]