* bump edition
* msrv 160
* upgrade clap and more deps
This commit is contained in:
Stephan D 2022-08-17 16:30:54 +02:00 committed by GitHub
parent 70e6a3db6e
commit 4a0e58ae15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 514 additions and 299 deletions

View File

@ -1,2 +1,2 @@
msrv = "1.50.0"
msrv = "1.60.0"
cognitive-complexity-threshold = 18

View File

@ -27,11 +27,6 @@ jobs:
profile: minimal
components: clippy
- name: New Resolver
run: |
cargo install cargo-modify --force
cargo modify new-resolver
- name: Build
run: cargo build
- name: Run tests

View File

@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [nightly, stable, '1.50']
rust: [nightly, stable, '1.60']
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
@ -48,12 +48,6 @@ jobs:
profile: minimal
components: clippy
- name: New Resolver
if: matrix.rust != '1.50'
run: |
cargo install cargo-modify --force
cargo modify new-resolver
- name: Build Debug
run: |
cargo build
@ -86,9 +80,9 @@ jobs:
- name: Build MSI (windows)
if: matrix.os == 'windows-latest'
run: |
cargo install cargo-wix --version 0.3.1
cargo install cargo-wix --version 0.3.3
cargo wix --version
cargo wix --no-build --nocapture --output ./target/wix/gitui.msi
cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui.msi
ls -l ./target/wix/gitui.msi
build-linux-musl:
@ -96,7 +90,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [nightly, stable, '1.50']
rust: [nightly, stable, '1.60']
continue-on-error: ${{ matrix.rust == 'nightly' }}
steps:
- uses: actions/checkout@master
@ -108,13 +102,6 @@ jobs:
default: true
target: x86_64-unknown-linux-musl
# TODO: remove once we depend on 1.51 as a msrv and resolver is supported by default
- name: New Resolver
if: matrix.rust != '1.50'
run: |
cargo install cargo-modify --force
cargo modify new-resolver
- name: Setup MUSL
run: |
sudo apt-get -qq install musl-tools

740
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@ name = "gitui"
version = "0.20.1"
authors = ["extrawurst <mail@rusticorn.com>"]
description = "blazing fast terminal-ui for git"
edition = "2018"
rust-version = "1.50"
edition = "2021"
rust-version = "1.60"
exclude = [".github/*", ".vscode/*", "assets/*"]
homepage = "https://github.com/extrawurst/gitui"
repository = "https://github.com/extrawurst/gitui"
@ -27,9 +27,9 @@ bitflags = "1.3"
bugreport = "0.5"
bytesize = { version = "1.1", default-features = false }
chrono = "0.4"
clap = { version = "2.33", default-features = false }
clap = { version = "3.2", features = [ "env", "cargo" ] }
crossbeam-channel = "0.5"
crossterm = { version = "0.20", features = [ "serde" ] }
crossterm = { version = "0.23", features = [ "serde" ] }
dirs-next = "2.0"
easy-cast = "0.4"
filetreelist = { path = "./filetreelist", version = "0.5" }
@ -43,10 +43,10 @@ ron = "0.7"
scopeguard = "1.1"
scopetime = { path = "./scopetime", version = "0.1" }
serde = "1.0"
simplelog = { version = "0.11", default-features = false }
simplelog = { version = "0.12", default-features = false }
syntect = { version = "5.0", default-features = false, features = ["parsing", "default-syntaxes", "default-themes", "html", "regex-fancy"] }
textwrap = "0.15"
tui = { version = "0.16", default-features = false, features = ['crossterm', 'serde'] }
tui = { version = "0.18", default-features = false, features = ['crossterm', 'serde'] }
unicode-segmentation = "1.9"
unicode-truncate = "0.2"
unicode-width = "0.1"
@ -56,7 +56,7 @@ which = "4.2"
# pprof is not available on windows
[target.'cfg(not(windows))'.dependencies]
pprof = { version = "=0.6.1", features = ["flamegraph"], optional = true }
pprof = { version = "0.10", features = ["flamegraph"], optional = true }
[dev-dependencies]
pretty_assertions = "1.0"

View File

@ -27,8 +27,8 @@ release-mac: build-release
release-win: build-release
mkdir -p release
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
cargo install cargo-wix --version 0.3.1
cargo wix --no-build --nocapture --output ./release/gitui.msi
cargo install cargo-wix --version 0.3.3
cargo wix -p gitui --no-build --nocapture --output ./release/gitui.msi
ls -l ./release/gitui.msi
release-linux-musl: build-linux-musl-release

View File

@ -169,7 +169,7 @@ Binaries available for:
### Requirements
- Minimum supported `rust`/`cargo` version: `1.50`
- Minimum supported `rust`/`cargo` version: `1.60`
- See [Install Rust](https://www.rust-lang.org/tools/install)
### Cargo Install

View File

@ -2,7 +2,7 @@
name = "asyncgit"
version = "0.21.0"
authors = ["extrawurst <mail@rusticorn.com>"]
edition = "2018"
edition = "2021"
description = "allow using git2 in a asynchronous context"
homepage = "https://github.com/extrawurst/gitui"
repository = "https://github.com/extrawurst/gitui"
@ -14,7 +14,7 @@ keywords = ["git"]
[dependencies]
crossbeam-channel = "0.5"
easy-cast = "0.4"
git2 = "0.14"
git2 = "0.15"
log = "0.4"
# git2 = { path = "../../extern/git2-rs", features = ["vendored-openssl"]}
# git2 = { git="https://github.com/extrawurst/git2-rs.git", rev="fc13dcc", features = ["vendored-openssl"]}
@ -30,7 +30,7 @@ url = "2.2"
[dev-dependencies]
invalidstring = { path = "../invalidstring", version = "0.1" }
pretty_assertions = "1.0"
serial_test = "0.6"
serial_test = "0.9"
tempfile = "3.2"
[features]

View File

@ -2,7 +2,7 @@
name = "filetreelist"
version = "0.5.0"
authors = ["extrawurst <mail@rusticorn.com>"]
edition = "2018"
edition = "2021"
description = "filetree abstraction based on a sorted path list, supports key based navigation events, folding, scrolling and more"
homepage = "https://github.com/extrawurst/gitui"
repository = "https://github.com/extrawurst/gitui"

View File

@ -2,7 +2,7 @@
name = "invalidstring"
version = "0.1.2"
authors = ["extrawurst <mail@rusticorn.com>"]
edition = "2018"
edition = "2021"
description = "just for testing invalid string data"
homepage = "https://github.com/extrawurst/gitui"
repository = "https://github.com/extrawurst/gitui"

View File

@ -2,7 +2,7 @@
name = "scopetime"
version = "0.1.1"
authors = ["extrawurst <mail@rusticorn.com>"]
edition = "2018"
edition = "2021"
description = "log runtime of arbitrary scope"
homepage = "https://github.com/extrawurst/gitui"
repository = "https://github.com/extrawurst/gitui"

View File

@ -25,7 +25,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.arg(
Arg::with_name("theme")
.help("Set the color theme (defaults to theme.ron)")
.short("t")
.short('t')
.long("theme")
.value_name("THEME")
.takes_value(true),
@ -33,7 +33,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.arg(
Arg::with_name("logging")
.help("Stores logging output into a cache directory")
.short("l")
.short('l')
.long("logging"),
)
.arg(
@ -44,7 +44,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.arg(
Arg::with_name("directory")
.help("Set the git directory")
.short("d")
.short('d')
.long("directory")
.env("GIT_DIR")
.takes_value(true),
@ -52,7 +52,7 @@ pub fn process_cmdline() -> Result<CliArgs> {
.arg(
Arg::with_name("workdir")
.help("Set the working directory")
.short("w")
.short('w')
.long("workdir")
.env("GIT_WORK_TREE")
.takes_value(true),

View File

@ -303,8 +303,9 @@ impl DiffComponent {
if let Some(diff) = &self.diff {
if diff.hunks.is_empty() {
let is_positive = diff.size_delta >= 0;
let delta_byte_size =
ByteSize::b(diff.size_delta.abs() as u64);
let delta_byte_size = ByteSize::b(
diff.size_delta.unsigned_abs() as u64,
);
let sign = if is_positive { "+" } else { "-" };
res.extend(vec![Spans::from(vec![
Span::raw(Cow::from("size: ")),