Skip to content

Commit

Permalink
Bump MSRV to 1.70.0
Browse files Browse the repository at this point in the history
The intention is to take advantage of `std::io::IsTerminal` that landed
in 1.70.0, both in `bat` and its dependencies (`clap`, `grep-cli`).

This will fix #2570 as well - `grep-cli` 0.1.9 has a patch for that.

Signed-off-by: mataha <mataha@users.noreply.github.com>
  • Loading branch information
mataha authored and Enselic committed Sep 1, 2023
1 parent 1893405 commit 82664e3
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 105 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

## Bugfixes

- Fix `more` not being found on Windows when provided via `BAT_PAGER`, see #2570, #2580, and #2651 (@mataha)

## Other

- Output directory for generated assets (completion, manual) can be customized, see #2515 (@tranzystorek-io)
- Bump MSRV to 1.70, see #2651 (@mataha)

## Syntaxes

Expand Down
110 changes: 18 additions & 92 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "0.23.0"
exclude = ["assets/syntaxes/*", "assets/themes/*"]
build = "build.rs"
edition = '2018'
rust-version = "1.64"
rust-version = "1.70"

[features]
default = ["application"]
Expand All @@ -25,7 +25,6 @@ application = [
# Mainly for developers that want to iterate quickly
# Be aware that the included features might change in the future
minimal-application = [
"is-terminal",
"clap",
"dirs",
"paging",
Expand All @@ -41,7 +40,6 @@ regex-onig = ["syntect/regex-onig"] # Use the "oniguruma" regex engine
regex-fancy = ["syntect/regex-fancy"] # Use the rust-only "fancy-regex" engine

[dependencies]
is-terminal = { version = "0.4.4", optional = true }
nu-ansi-term = "0.47.0"
ansi_colours = "^1.2"
bincode = "1.0"
Expand All @@ -62,7 +60,7 @@ path_abs = { version = "0.5", default-features = false }
clircle = "0.4"
bugreport = { version = "0.5.0", optional = true }
dirs = { version = "5.0.0", optional = true }
grep-cli = { version = "0.1.7", optional = true }
grep-cli = { version = "0.1.9", optional = true }
regex = { version = "1.8.3", optional = true }
walkdir = { version = "2.3", optional = true }
bytesize = { version = "1.2.0" }
Expand All @@ -78,7 +76,7 @@ default-features = false
features = ["parsing"]

[dependencies.clap]
version = "4.3.0"
version = "4.4.0"
optional = true
features = ["wrap_help", "cargo"]

Expand All @@ -98,7 +96,7 @@ tempfile = "3.5.0"
nix = { version = "0.26.2", default-features = false, features = ["term"] }

[build-dependencies.clap]
version = "4.1.8"
version = "4.4.0"
optional = true
features = ["wrap_help", "cargo"]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ binaries are also available: look for archives with `musl` in the file name.

### From source

If you want to build `bat` from source, you need Rust 1.64.0 or
If you want to build `bat` from source, you need Rust 1.70.0 or
higher. You can then use `cargo` to build everything:

```bash
Expand Down
2 changes: 1 addition & 1 deletion doc/README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ansible-galaxy install aeimer.install_bat
### From source


`bat` をソースからビルドしたいならば、Rust 1.64.0 以上の環境が必要です。
`bat` をソースからビルドしたいならば、Rust 1.70.0 以上の環境が必要です。
`cargo` を使用してビルドすることができます:

```bash
Expand Down
2 changes: 1 addition & 1 deletion doc/README-ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ scoop install bat

### 소스에서

`bat`의 소스를 빌드하기 위해서는, Rust 1.64.0 이상이 필요합니다.
`bat`의 소스를 빌드하기 위해서는, Rust 1.70.0 이상이 필요합니다.
`cargo`를 이용해 전부 빌드할 수 있습니다:

```bash
Expand Down
2 changes: 1 addition & 1 deletion doc/README-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ ansible-galaxy install aeimer.install_bat

### Из исходников

Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.64.0 или выше. После этого используйте `cargo`, чтобы все скомпилировать:
Если вы желаете установить `bat` из исходников, вам понадобится Rust 1.70.0 или выше. После этого используйте `cargo`, чтобы все скомпилировать:

```bash
cargo install --locked bat
Expand Down
2 changes: 1 addition & 1 deletion doc/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ scoop install bat

### 从源码编译

如果你想要自己构建`bat`,那么你需要安装有高于1.64.0版本的 Rust。
如果你想要自己构建`bat`,那么你需要安装有高于1.70.0版本的 Rust。

使用以下命令编译。

Expand Down
3 changes: 1 addition & 2 deletions src/bin/bat/app.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use std::collections::HashSet;
use std::env;
use std::io::IsTerminal;
use std::path::{Path, PathBuf};

use is_terminal::IsTerminal;

use crate::{
clap_app,
config::{get_args_from_config_file, get_args_from_env_opts_var, get_args_from_env_vars},
Expand Down

0 comments on commit 82664e3

Please sign in to comment.