Skip to content

Commit

Permalink
Bump minimum required Rust version to 1.58
Browse files Browse the repository at this point in the history
Difftastic is generally conservative about MSRV, and will only
increase the version when there is a compelling reason (e.g. major
performance improvement, important bug fix in a dependendency).

This version increase will enable us to upgrade crossterm to 0.26, which
has better detection of terminal width on Windows.

I've also clarified MSRV details for other dependencies that cannot
currently be upgraded.
  • Loading branch information
Wilfred committed Jul 26, 2023
1 parent 721ad08 commit b3acf48
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install jq
run: sudo apt-get install -y jq

- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo doc

- name: Setup mdBook
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo test
# This also runs tests that rely on the MIME database being
# present.
Expand All @@ -27,7 +27,7 @@ jobs:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@1.57.0
# - uses: dtolnay/rust-toolchain@1.58.0
# - run: rustup target add aarch64-unknown-linux-gnu
# - run: sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# - run: cargo build --target=aarch64-unknown-linux-gnu
Expand All @@ -37,23 +37,23 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo test

test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo test

regression_test:
name: Output Regression Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- name: Generate output for all sample files
run: ./sample_files/compare_all.sh
- name: Verify output is unchanged
Expand All @@ -64,13 +64,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo package --allow-dirty

fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.57.0
- uses: dtolnay/rust-toolchain@1.58.0
- run: cargo fmt --all -- --check
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ where e.g. PDF was sometimes incorrectly considered as UTF-8.
Improved handling of delimiters ("nested sliders") in languages that
prefer the outer delimiter, such as JSON and Lisps.

### Build

Difftastic now requires Rust 1.58 to build.

## 0.48 (released 12th July 2023)

### Parsing
Expand Down
12 changes: 5 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = ["Wilfred Hughes <[email protected]>"]
keywords = ["diff", "syntax"]
categories = ["development-tools", "command-line-utilities", "parser-implementations"]
edition = "2018"
rust-version = "1.57.0"
rust-version = "1.58.0"
include = [
"/build.rs",
"/src/",
Expand All @@ -28,16 +28,15 @@ pkg-url = "{ repo }/releases/download/{ version }/difft-{ target }.{ archive-for
pkg-fmt = "zip"

[dependencies]
# This is the last version that supports rust 1.57, regex 1.8 requires rust 1.60.
# regex 1.8 requires rust 1.60.
regex = ">= 1.7, < 1.8"
clap = { version = "3.1.8", features = ["cargo", "env", "wrap_help"] }
itertools = "0.10.1"
typed-arena = "2.0.1"
rustc-hash = "1.1.0"
strsim = "0.10.0"
lazy_static = "1.4.0"
# This is the last version that supports 1.57, tree-sitter 0.20.10
# requires rust 1.65.
# tree-sitter 0.20.10 requires rust 1.65.
tree-sitter = "0.20.9"
libc = "0.2.108"
log = "0.4.14"
Expand All @@ -64,10 +63,9 @@ strum = { version = "0.25", features = ["derive"] }
hashbrown = "0.12.3"

[dev-dependencies]
# This is the last version of assert_cmd that supports rustc 1.57.
# assert_cmd 2.0.6 requires rust 1.60
assert_cmd = ">= 2, <= 2.0.5"
# Predicates is a dependency of assert_cmd, but needs pinning to the
# last version that supports rustc 1.57.
# Predicates is a dependency of assert_cmd, but 2.1.2 requires rust 1.60.
predicates = ">= 2, <= 2.1.1"

pretty_assertions = "1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion manual/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.57 or later.
requires Rust version 1.58 or later.

You will also need a C++ compiler that supports C++14. If you're using
GCC, you need at least version 8.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.57"
channel = "1.58"
components = ["rustfmt"]
profile = "minimal"
2 changes: 1 addition & 1 deletion translation/zh-CN/manual-zh-CN/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ brew install difftastic

### 要求

Difftastic 使用 Rust 编写,所以你需安装 Rust。我推荐使用 [rustup](https://rustup.rs/) 安装 Rust。Difftastic 要求 Rust 版本不低于 1.57
Difftastic 使用 Rust 编写,所以你需安装 Rust。我推荐使用 [rustup](https://rustup.rs/) 安装 Rust。Difftastic 要求 Rust 版本不低于 1.58

你也需要一个支持 C++14 的 C++ 编译器。如果你正在使用 GCC,则 GCC 版本至少为 8。

Expand Down

0 comments on commit b3acf48

Please sign in to comment.