From 601f453c11539e400b260aba73faf633743d07bf Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 3 Sep 2026 15:55:32 +0800 Subject: [PATCH] build: drop the rust-toolchain.toml pin cargo x lint auto-installs taplo-cli via an unpinned cargo install when taplo is not on PATH. Recent taplo-cli releases pull in transitive dependencies (icu_*, time) that require rustc 1.88, so the install fails on a clean environment where the pinned 1.86.0 toolchain is active. The workspace already declares its MSRV with rust-version in Cargo.toml and CI verifies it through the test matrix; every CI job also deleted rust-toolchain.toml before installing its toolchain, so the pin only affected local development. Drop the file and the now-obsolete CI steps, and document the nightly requirement for lint/check in CONTRIBUTING.md. --- .github/workflows/ci.yml | 4 ---- CONTRIBUTING.md | 7 ++++--- rust-toolchain.toml | 20 -------------------- 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebd0d475..a83d451a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,8 +42,6 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - - name: Delete rust-toolchain.toml - run: rm rust-toolchain.toml - name: Install toolchain run: rustup toolchain install --component rustfmt,clippy nightly - uses: Swatinem/rust-cache@v2 @@ -80,8 +78,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 - - name: Delete rust-toolchain.toml - run: rm rust-toolchain.toml - name: Install toolchain run: | rustup toolchain install ${{ matrix.rust-version }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ef490b8..889d68a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,11 +23,12 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh For Windows users, download `rustup-init.exe` from [here](https://win.rustup.rs/x86_64) instead. -Rustup will read the `rust-toolchain.toml` file and set up everything else automatically. To ensure that everything works correctly, run `cargo version` under the root directory: +This project declares its minimum supported Rust version (MSRV) with `rust-version` in the workspace `Cargo.toml`; CI verifies it explicitly. Any toolchain at or above the MSRV works for building and testing. + +The lint and check commands additionally require a nightly toolchain: ```shell -cargo version -# cargo 1.86.0 ( ) +rustup toolchain install --component rustfmt,clippy nightly ``` To keep code style consistent, run `cargo x lint --fix` to automatically fix any style issues before committing your changes. diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 7df2ea36..00000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,20 +0,0 @@ -# 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. - -[toolchain] -channel = "1.86.0" -components = ["rustfmt", "clippy", "rust-analyzer"]