From 6760559e6f97471e56ec656c85261ec70816655f Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sun, 28 Jan 2024 12:55:07 -0800 Subject: [PATCH] Increase MSRV to 1.65 See discussion in #570 --- .github/workflows/deploy_docs.yml | 2 +- .github/workflows/test.yml | 10 +++++----- CHANGELOG.md | 4 ++++ Cargo.toml | 12 +++++++++--- manual/src/installation.md | 2 +- rust-toolchain.toml | 2 +- translation/zh-CN/manual-zh-CN/src/installation.md | 2 +- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 731e111cdd..da23e8dbe1 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -27,7 +27,7 @@ jobs: - name: Install jq run: sudo apt-get install -y jq - - uses: dtolnay/rust-toolchain@1.63.0 + - uses: dtolnay/rust-toolchain@1.65.0 - run: cargo doc - name: Setup mdBook diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4a197aef1..29b49eb297 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.63.0 + uses: dtolnay/rust-toolchain@1.65.0 with: targets: ${{ matrix.job.target }} @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.63.0 + - uses: dtolnay/rust-toolchain@1.65.0 # This runs tests that rely on the MIME database being present. - run: cargo test -- --ignored @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.63.0 + - uses: dtolnay/rust-toolchain@1.65.0 - name: Generate output for all sample files run: ./sample_files/compare_all.sh - name: Verify output is unchanged @@ -93,7 +93,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.63.0 + - uses: dtolnay/rust-toolchain@1.65.0 - run: cargo package --allow-dirty fmt: @@ -101,7 +101,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.63.0 + - uses: dtolnay/rust-toolchain@1.65.0 - run: cargo fmt --all -- --check actionlint: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bbdcee864..b34b838b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The default display width for tabs has changed to 4. Fixed an issue where difftastic would sometimes output literal tabs rather than respecting the display width for tabs. +### Build + +difftastic now requires Rust 1.65 to build. + ## 0.54 (released 7th January 2024) ### Parsing diff --git a/Cargo.toml b/Cargo.toml index 57e82c27d4..00b069baa5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,15 @@ keywords = ["diff", "syntax"] categories = ["development-tools", "command-line-utilities", "parser-implementations"] edition = "2021" # Goal: support at least 12 months of Rust versions, and also the Rust -# version on Debian stable: -# https://tracker.debian.org/pkg/rustc -rust-version = "1.63.0" +# version on Debian stable (see https://tracker.debian.org/pkg/rustc, +# currently 1.63). +# +# Unfortunately tree-sitter 0.20.10 has an MSRV[1] of 1.65, and it has +# a bugfix[2] we want. +# +# 1: https://github.com/tree-sitter/tree-sitter/issues/2669 +# 2: https://github.com/Wilfred/difftastic/issues/570 +rust-version = "1.65.0" include = [ "/build.rs", "/src/", diff --git a/manual/src/installation.md b/manual/src/installation.md index 04211110be..e2e4561d3e 100644 --- a/manual/src/installation.md +++ b/manual/src/installation.md @@ -28,7 +28,7 @@ $ brew install difftastic Difftastic is written in Rust, so you will need Rust installed. I recommend [rustup](https://rustup.rs/) to install Rust. Difftastic -requires Rust version 1.63 or later. +requires Rust version 1.65 or later. You will also need a C++ compiler that supports C++14. If you're using GCC, you need at least version 8. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index fd8c4d62fb..5daeec341b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.63" +channel = "1.65" components = ["rustfmt"] profile = "minimal" diff --git a/translation/zh-CN/manual-zh-CN/src/installation.md b/translation/zh-CN/manual-zh-CN/src/installation.md index 159ed63dc1..a07273febd 100644 --- a/translation/zh-CN/manual-zh-CN/src/installation.md +++ b/translation/zh-CN/manual-zh-CN/src/installation.md @@ -22,7 +22,7 @@ $ brew install difftastic ### 要求 -Difftastic 使用 Rust 编写,所以你需安装 Rust。我推荐使用 [rustup](https://rustup.rs/) 安装 Rust。Difftastic 要求 Rust 版本不低于 1.63。 +Difftastic 使用 Rust 编写,所以你需安装 Rust。我推荐使用 [rustup](https://rustup.rs/) 安装 Rust。Difftastic 要求 Rust 版本不低于 1.65。 你也需要一个支持 C++14 的 C++ 编译器。如果你正在使用 GCC,则 GCC 版本至少为 8。