From 9ccb667653ca2e8e6243becc9312ca30dc2ce989 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Tue, 5 Jan 2021 10:14:30 +0100 Subject: [PATCH 01/21] Add integration test for unparsable pager Right now all tests pass even if we e.g. return Ok(OutputType::stdout()) instead of doing .chain_err(|| "Could not parse pager command.")? so add a test to make sure this functionality don't break. --- tests/integration_tests.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index e16a8a91..7ab99bb2 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -522,6 +522,17 @@ fn alias_pager_disable_long_overrides_short() { .stdout(predicate::eq("pager-output\n").normalize()); } +#[test] +fn pager_failed_to_parse() { + bat() + .env("BAT_PAGER", "mismatched-quotes 'a") + .arg("--paging=always") + .arg("test.txt") + .assert() + .failure() + .stderr(predicate::str::contains("Could not parse pager command")); +} + #[test] fn config_location_test() { bat_with_config() From caf0743811b3b38eab353ddf8ba7c8836f049b12 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Tue, 5 Jan 2021 16:43:49 +0100 Subject: [PATCH 02/21] CICD: Code Coverage: Use matrix.job.toolchain directly No need for complicated var and set-output logic when we can simply use matrix.job.toolchain directly. --- .github/workflows/CICD.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 66fb7c76..ddbe5bbc 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -417,14 +417,6 @@ jobs: id: vars shell: bash run: | - # toolchain - TOOLCHAIN="nightly" ## default to "nightly" toolchain - # * use requested TOOLCHAIN if specified - if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi - # * use requested TOOLCHAIN if specified - if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi - echo set-output name=TOOLCHAIN::${TOOLCHAIN} - echo ::set-output name=TOOLCHAIN::${TOOLCHAIN} # target-specific options # * CODECOV_FLAGS CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' ) @@ -433,7 +425,7 @@ jobs: - name: rust toolchain ~ install uses: actions-rs/toolchain@v1 with: - toolchain: ${{ steps.vars.outputs.TOOLCHAIN }} + toolchain: ${{ matrix.job.toolchain }} override: true profile: minimal # minimal component installation (ie, no documentation) - name: Test From 939a6a5f4dc4e0874d4a1f112fdb6c8e330d85f8 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 12:30:34 +0100 Subject: [PATCH 03/21] CICD: Remove duplicate set-output calls (#1479) The ::set-output syntax is the correct one according to https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter, so remove duplicates without that syntax. --- .github/workflows/CICD.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index ddbe5bbc..5ef9a199 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -116,43 +116,31 @@ jobs: case ${{ matrix.job.target }} in *-pc-windows-gnu) TOOLCHAIN="stable-${{ matrix.job.target }}" ;; esac; # * use requested TOOLCHAIN if specified if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi - echo set-output name=TOOLCHAIN::${TOOLCHAIN} echo ::set-output name=TOOLCHAIN::${TOOLCHAIN} # staging directory STAGING='_staging' - echo set-output name=STAGING::${STAGING} echo ::set-output name=STAGING::${STAGING} # determine EXE suffix EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac; - echo set-output name=EXE_suffix::${EXE_suffix} echo ::set-output name=EXE_suffix::${EXE_suffix} # parse commit reference info REF_NAME=${GITHUB_REF#refs/*/} unset REF_BRANCH ; case ${GITHUB_REF} in refs/heads/*) REF_BRANCH=${GITHUB_REF#refs/heads/} ;; esac; unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac; REF_SHAS=${GITHUB_SHA:0:8} - echo set-output name=REF_NAME::${REF_NAME} - echo set-output name=REF_BRANCH::${REF_BRANCH} - echo set-output name=REF_TAG::${REF_TAG} - echo set-output name=REF_SHAS::${REF_SHAS} echo ::set-output name=REF_NAME::${REF_NAME} echo ::set-output name=REF_BRANCH::${REF_BRANCH} echo ::set-output name=REF_TAG::${REF_TAG} echo ::set-output name=REF_SHAS::${REF_SHAS} # parse target unset TARGET_ARCH ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) TARGET_ARCH=arm ;; i686-*) TARGET_ARCH=i686 ;; x86_64-*) TARGET_ARCH=x86_64 ;; esac; - echo set-output name=TARGET_ARCH::${TARGET_ARCH} echo ::set-output name=TARGET_ARCH::${TARGET_ARCH} unset TARGET_OS ; case ${{ matrix.job.target }} in *-linux-*) TARGET_OS=linux ;; *-apple-*) TARGET_OS=macos ;; *-windows-*) TARGET_OS=windows ;; esac; - echo set-output name=TARGET_OS::${TARGET_OS} echo ::set-output name=TARGET_OS::${TARGET_OS} # package name PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac; PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${{ matrix.job.target }} PKG_NAME=${PKG_BASENAME}${PKG_suffix} - echo set-output name=PKG_suffix::${PKG_suffix} - echo set-output name=PKG_BASENAME::${PKG_BASENAME} - echo set-output name=PKG_NAME::${PKG_NAME} echo ::set-output name=PKG_suffix::${PKG_suffix} echo ::set-output name=PKG_BASENAME::${PKG_BASENAME} echo ::set-output name=PKG_NAME::${PKG_NAME} @@ -160,7 +148,6 @@ jobs: unset DEPLOY ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOY='true' ; fi # unset deploy on ubuntu-18.04 x64 - we will deploy the tarball/deb built on ubuntu-16.04 x64 if [ "${{ matrix.job.os }}" = "ubuntu-18.04" ] && [ "${{ matrix.job.target }}" = "x86_64-unknown-linux-gnu" ]; then unset DEPLOY; fi - echo set-output name=DEPLOY::${DEPLOY:-/false} echo ::set-output name=DEPLOY::${DEPLOY} # DPKG architecture? unset DPKG_ARCH @@ -170,43 +157,34 @@ jobs: i686-*-linux-*) DPKG_ARCH=i686 ;; x86_64-*-linux-*) DPKG_ARCH=amd64 ;; esac; - echo set-output name=DPKG_ARCH::${DPKG_ARCH} echo ::set-output name=DPKG_ARCH::${DPKG_ARCH} # DPKG version? unset DPKG_VERSION ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DPKG_VERSION=${REF_TAG/#[vV]/} ; fi - echo set-output name=DPKG_VERSION::${DPKG_VERSION} echo ::set-output name=DPKG_VERSION::${DPKG_VERSION} # DPKG base name/conflicts? DPKG_BASENAME=${PROJECT_NAME} DPKG_CONFLICTS=${PROJECT_NAME}-musl case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac; - echo set-output name=DPKG_BASENAME::${DPKG_BASENAME} - echo set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS} echo ::set-output name=DPKG_BASENAME::${DPKG_BASENAME} echo ::set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS} # DPKG name unset DPKG_NAME; if [[ -n $DPKG_ARCH && -n $DPKG_VERSION ]]; then DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" ; fi - echo set-output name=DPKG_NAME::${DPKG_NAME} echo ::set-output name=DPKG_NAME::${DPKG_NAME} # target-specific options # * CARGO_USE_CROSS (truthy) CARGO_USE_CROSS='true' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) unset CARGO_USE_CROSS ;; esac; - echo set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS:-/false} echo ::set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS} # # * `arm` cannot be tested on ubuntu-* hosts (b/c testing is currently primarily done via comparison of target outputs with built-in outputs and the `arm` target is not executable on the host) JOB_DO_TESTING="true" case ${{ matrix.job.target }} in arm-*) unset JOB_DO_TESTING ;; esac; - echo set-output name=JOB_DO_TESTING::${JOB_DO_TESTING:-/false} echo ::set-output name=JOB_DO_TESTING::${JOB_DO_TESTING} # # * test only library unit tests and binary for arm-type targets unset CARGO_TEST_OPTIONS unset CARGO_TEST_OPTIONS ; case ${{ matrix.job.target }} in arm-* | aarch64-*) CARGO_TEST_OPTIONS="--lib --bin ${PROJECT_NAME}" ;; esac; - echo set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} # * executable for `strip`? STRIP="strip" ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;; aarch64-unknown-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; *-pc-windows-msvc) STRIP="" ;; esac; - echo set-output name=STRIP::${STRIP} echo ::set-output name=STRIP::${STRIP} - name: Create all needed build/work directories shell: bash @@ -420,7 +398,6 @@ jobs: # target-specific options # * CODECOV_FLAGS CODECOV_FLAGS=$( echo "${{ matrix.job.os }}" | sed 's/[^[:alnum:]]/_/g' ) - echo set-output name=CODECOV_FLAGS::${CODECOV_FLAGS} echo ::set-output name=CODECOV_FLAGS::${CODECOV_FLAGS} - name: rust toolchain ~ install uses: actions-rs/toolchain@v1 From 78aed2cb69ab0bddeb22dcc5fbf3f44b98691e4d Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 09:03:57 +0100 Subject: [PATCH 04/21] CICD: Remove use-cross when host == target --- .github/workflows/CICD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 5ef9a199..21bdbf47 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -88,9 +88,9 @@ jobs: - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: use-cross } - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: use-cross } - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , use-cross: use-cross } - - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu , use-cross: use-cross } + - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu } - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: use-cross } - - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu , use-cross: use-cross } + - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu } - { os: macos-latest , target: x86_64-apple-darwin } # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; linker errors (missing '_imp____acrt_iob_func') - { os: windows-latest , target: i686-pc-windows-msvc } From b458292a69bf21b90d7646bf22fb40cdac9a28f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Jan 2021 21:06:57 +0100 Subject: [PATCH 05/21] Target VimL upstream .sublime-syntax file (#1483) * Target VimL upstream .sublime-syntax file Upstream **VimL Syntax** has been updated to include `.sublime-syntax` file instead of `.tmLanguage`, therefore manually added `.sublime-syntax` is no longer needed * Remove .bin changes --- assets/syntaxes/02_Extra/VimL | 2 +- assets/syntaxes/02_Extra/VimL.sublime-syntax | 91 -------------------- 2 files changed, 1 insertion(+), 92 deletions(-) delete mode 100644 assets/syntaxes/02_Extra/VimL.sublime-syntax diff --git a/assets/syntaxes/02_Extra/VimL b/assets/syntaxes/02_Extra/VimL index 23afc890..7ebcaa1d 160000 --- a/assets/syntaxes/02_Extra/VimL +++ b/assets/syntaxes/02_Extra/VimL @@ -1 +1 @@ -Subproject commit 23afc890977bb1fd43fd05e7d983f994993d4982 +Subproject commit 7ebcaa1d987be059213f06bfc0833dcaea9e0b91 diff --git a/assets/syntaxes/02_Extra/VimL.sublime-syntax b/assets/syntaxes/02_Extra/VimL.sublime-syntax deleted file mode 100644 index 3f96a985..00000000 --- a/assets/syntaxes/02_Extra/VimL.sublime-syntax +++ /dev/null @@ -1,91 +0,0 @@ -%YAML 1.2 ---- -# http://www.sublimetext.com/docs/3/syntax.html -name: VimL -file_extensions: - - vim - - .vimrc -scope: source.viml -contexts: - main: - - include: comment - - include: string_quoted_double - - include: string_quoted_single - - include: string_regex - - include: inline_comment - - include: number_int - - include: number_hex - - include: keyword - - include: support_function - - include: support_variable - - include: support_type - - include: function_params - - include: function_definition - - include: function_call - - include: function - - include: variable - - include: expr - comment: - - match: ^\s*".*$ - scope: comment.line.quotes.viml - captures: - 1: punctuation.definition.comment.vim - expr: - - match: (\|\||&&|==(\?|#)?|(!|>|<)=(#|\?)?|(=|!)~(#|\?)?|(>|<)(#|\?)is|isnot|\.|\*|\\|%) - scope: storage.function.viml - function: - - match: \b(fu(n|nction)?|end(f|fu|fun|function)?)\b - scope: storage.function.viml - function_call: - - match: '(([sgbwtl]|)?:?[0-9a-zA-Z_#]+)(?=\()' - scope: support.function.any-method - function_definition: - - match: '^\s*(function)\s*!?\s+(?=(s:)?[0-9a-zA-Z_#]+\s*\()' - captures: - 1: storage.function.viml - push: - - meta_scope: meta.function.viml - - match: (\() - captures: - 1: punctuation.definition.parameters.begin.viml - pop: true - - match: "(s:)?[0-9a-zA-Z_#]+" - scope: entity.name.function.viml - function_params: - - match: '-\w+=' - scope: support.type.viml - inline_comment: - - match: '(?!\$)(")(?!\{).*$\n?' - scope: comment.line.quotes.viml - captures: - 1: punctuation.definition.comment.vim - keyword: - - match: \b(if|while|for|try|return|throw|end(if|for|while|try)?|au(g|group)|else(if|)?|do|in|catch|finally|:)\b - scope: keyword.control.viml - number_hex: - - match: "0x[0-9a-f]+" - scope: constant.numeric.hex - number_int: - - match: '-?\d+' - scope: constant.numeric.integer - string_quoted_double: - - match: '"(\\\\|\\"|\n[^\S\n]*\\|[^\n"])*"' - scope: string.quoted.double.viml - string_quoted_single: - - match: '''(''''|\n[^\S\n]*\\|[^\n''])*''' - scope: string.quoted.single.viml - string_regex: - - match: '[gvs]{1}/(\\\\|\\/|\n[^\S\n]*\\|[^\n/])*/' - scope: string.regexp.viml - support_function: - - match: \b(set(local|global)?|let|command|filetype|syntax|colorscheme|\w*map|\w*a(b|brev)?|syn|exe(c|cute)?|ec(ho|)?|au(tocmd|)?)\b - scope: support.function.viml - support_type: - - match: <.*?> - scope: support.type.viml - support_variable: - - match: '\b(am(enu|)?|(hl|inc)?search|[Bb]uf([Nn]ew[Ff]ile|[Rr]ead)?|[Ff]ile[Tt]ype)\b' - scope: support.variable.viml - variable: - - match: '([sSgGbBwWlLaAvV]:|@|$|&(?!&))\w*' - scope: variable.other.viml From 59c9105c2542f19633eaa8294c2549912d2becca Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 6 Jan 2021 20:09:01 +0100 Subject: [PATCH 06/21] Fix clippy warnings in tests on Windows --- tests/integration_tests.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 7ab99bb2..e2bd3339 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -8,7 +8,11 @@ use std::str::from_utf8; use std::time::Duration; const EXAMPLES_DIR: &str = "tests/examples"; + +#[cfg(unix)] const SAFE_CHILD_PROCESS_CREATION_TIME: Duration = Duration::from_millis(100); + +#[cfg(unix)] const CHILD_WAIT_TIMEOUT: Duration = Duration::from_secs(15); fn bat_raw_command() -> Command { From 35e3c51b75c659690276b74cb97fe684a5d34699 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 6 Jan 2021 22:09:22 +0100 Subject: [PATCH 07/21] Fix unused import warning --- tests/integration_tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index e2bd3339..aab2ca84 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -5,6 +5,8 @@ use std::fs::File; use std::path::Path; use std::process::{Command, Stdio}; use std::str::from_utf8; + +#[cfg(unix)] use std::time::Duration; const EXAMPLES_DIR: &str = "tests/examples"; From fe08de846de71534713fee43902b6fa044cb8dfc Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 21:35:05 +0100 Subject: [PATCH 08/21] CICD: Code Coverage: Disable for now --- .github/workflows/CICD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 21bdbf47..dc3e8af5 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -380,6 +380,7 @@ jobs: coverage: name: Code Coverage + if: "false" runs-on: ${{ matrix.job.os }} strategy: fail-fast: true From 5e1f9fadf4d9a45c39e41ebc0deb567fbc0427fd Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 22:03:18 +0100 Subject: [PATCH 09/21] CICD: Code Coverage: Explain why disabled --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index dc3e8af5..1ab74e50 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -380,7 +380,7 @@ jobs: coverage: name: Code Coverage - if: "false" + if: "false" # Temporarily disabled until made functional again, see https://github.com/sharkdp/bat/pull/1484 runs-on: ${{ matrix.job.os }} strategy: fail-fast: true From ebb97e94a9f3936e7db23c211f9dba779b0daa89 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Thu, 31 Dec 2020 18:17:15 +0100 Subject: [PATCH 10/21] Add --diagnostic option to bat --- Cargo.lock | 61 +++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 1 + src/bin/bat/clap_app.rs | 6 ++++ src/bin/bat/main.rs | 24 ++++++++++++++-- 4 files changed, 88 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d34c3c4..b483ef2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,6 +98,7 @@ dependencies = [ "ansi_term 0.12.1", "assert_cmd", "atty", + "bugreport", "clap", "clircle", "console", @@ -193,6 +194,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "bugreport" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824268bc0fcb3b94da597b81fa9dd52175cfde5522f4892a0cff3932802ff805" +dependencies = [ + "snailquote", + "sys-info", +] + [[package]] name = "byte-tools" version = "0.3.1" @@ -1070,6 +1081,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074" +[[package]] +name = "snailquote" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f34b729d802f52194598858ac852c3fb3b33f6e026cd03195072ccb7bf3fc810" +dependencies = [ + "thiserror", + "unicode_categories", +] + [[package]] name = "std_prelude" version = "0.2.12" @@ -1084,9 +1105,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.42" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" +checksum = "a571a711dddd09019ccc628e1b17fe87c59b09d513c06c026877aa708334f37a" dependencies = [ "proc-macro2", "quote", @@ -1116,6 +1137,16 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "sys-info" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5cfbd84f86389198ade41b439f72a5b1b3a8ba728e61cd589e1720d0df44c39" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -1156,6 +1187,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "thiserror" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "thread_local" version = "1.0.1" @@ -1219,6 +1270,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "url" version = "2.1.1" diff --git a/Cargo.toml b/Cargo.toml index 212db77a..9538f515 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,7 @@ serde_yaml = "0.8" semver = "0.11" path_abs = { version = "0.5", default-features = false } clircle = "0.2.0" +bugreport = "0.1" [dependencies.git2] version = "0.13" diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index 4e642760..b2ebb6f7 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -477,6 +477,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { .hidden(true) .help("Show bat's cache directory."), ) + .arg( + Arg::with_name("diagnostic") + .long("diagnostic") + .hidden_short_help(true) + .help("Show diagnostic information for bug reports.") + ) .help_message("Print this help message.") .version_message("Show version information."); diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index af8ca787..cd164aba 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -35,8 +35,7 @@ use bat::{ error::*, input::Input, style::{StyleComponent, StyleComponents}, - MappingTarget, - PagingMode, + MappingTarget, PagingMode, }; const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs"); @@ -228,6 +227,27 @@ fn run_controller(inputs: Vec, config: &Config) -> Result { fn run() -> Result { let app = App::new()?; + if app.matches.is_present("diagnostic") { + use bugreport::{bugreport, collectors::*}; + + bugreport!() + .info(SoftwareVersion::default()) + .info(OperatingSystem::default()) + .info(CommandLine::default()) + .info(EnvironmentVariables::list(&[ + "SHELL", + "PAGER", + "BAT_PAGER", + "BAT_CONFIG_PATH", + "BAT_STYLE", + "BAT_THEME", + "BAT_TABS", + ])) + .print_markdown(); + + return Ok(true); + } + match app.matches.subcommand() { ("cache", Some(cache_matches)) => { // If there is a file named 'cache' in the current working directory, From dec94b4111ea7e484df6ce52041c0a86c3f5e713 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 1 Jan 2021 17:41:41 +0100 Subject: [PATCH 11/21] Add config file, compile time info and less version --- Cargo.lock | 2 -- Cargo.toml | 2 +- src/bin/bat/main.rs | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b483ef2b..48f16bbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,8 +197,6 @@ dependencies = [ [[package]] name = "bugreport" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824268bc0fcb3b94da597b81fa9dd52175cfde5522f4892a0cff3932802ff805" dependencies = [ "snailquote", "sys-info", diff --git a/Cargo.toml b/Cargo.toml index 9538f515..5800348d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ serde_yaml = "0.8" semver = "0.11" path_abs = { version = "0.5", default-features = false } clircle = "0.2.0" -bugreport = "0.1" +bugreport = "0.2" [dependencies.git2] version = "0.13" diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index cd164aba..97690a8d 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -243,6 +243,9 @@ fn run() -> Result { "BAT_THEME", "BAT_TABS", ])) + .info(FileContent::new("Config file", config_file())) + .info(CompileTimeInformation::default()) + .info(CommandOutput::new("Less version", "less", &["--version"])) .print_markdown(); return Ok(true); From 99a61580e1c5c290e1e080b059cf29c55c381a6f Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 1 Jan 2021 21:51:13 +0100 Subject: [PATCH 12/21] Add --diagnostic run to CI --- .github/workflows/CICD.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 1ab74e50..8f6696b9 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -226,7 +226,13 @@ jobs: with: use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} command: run - args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi-dark Cargo.toml src/config.rs + args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs + - name: bat diagnostics output + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + command: run + args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic - name: Check features regex-onig uses: actions-rs/cargo@v1 with: From 2465438ec32cffa03a0ce3efd04c4565937cc346 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 1 Jan 2021 22:54:53 +0100 Subject: [PATCH 13/21] Bump bugreport version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5800348d..892475fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ serde_yaml = "0.8" semver = "0.11" path_abs = { version = "0.5", default-features = false } clircle = "0.2.0" -bugreport = "0.2" +bugreport = "0.2.1" [dependencies.git2] version = "0.13" From 60406c7c2d581cb9110e02e7388e405afc831557 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 1 Jan 2021 23:17:56 +0100 Subject: [PATCH 14/21] Exhaustive list of relevant environment variables --- src/bin/bat/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index 97690a8d..bdde0fa2 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -237,11 +237,17 @@ fn run() -> Result { .info(EnvironmentVariables::list(&[ "SHELL", "PAGER", - "BAT_PAGER", + "BAT_CACHE_PATH", "BAT_CONFIG_PATH", + "BAT_OPTS", + "BAT_PAGER", "BAT_STYLE", - "BAT_THEME", "BAT_TABS", + "BAT_THEME", + "XDG_CONFIG_HOME", + "XDG_CACHE_HOME", + "COLORTERM", + "NO_COLOR", ])) .info(FileContent::new("Config file", config_file())) .info(CompileTimeInformation::default()) From 6a52f69b5816819ae3d44f231e236e6249c4eff7 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 6 Jan 2021 22:20:47 +0100 Subject: [PATCH 15/21] Update to bugreport 0.3.0 --- Cargo.lock | 4 +++- Cargo.toml | 2 +- src/bin/bat/main.rs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48f16bbd..ced057ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,7 +196,9 @@ dependencies = [ [[package]] name = "bugreport" -version = "0.1.0" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "116762017f173ea5d8103e75533f6bdb62cb6f2257c9c95672beb085a70daed8" dependencies = [ "snailquote", "sys-info", diff --git a/Cargo.toml b/Cargo.toml index 892475fc..18216303 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ serde_yaml = "0.8" semver = "0.11" path_abs = { version = "0.5", default-features = false } clircle = "0.2.0" -bugreport = "0.2.1" +bugreport = "0.3" [dependencies.git2] version = "0.13" diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index bdde0fa2..e2862fe9 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -228,7 +228,7 @@ fn run() -> Result { let app = App::new()?; if app.matches.is_present("diagnostic") { - use bugreport::{bugreport, collectors::*}; + use bugreport::{bugreport, collector::*, format::Markdown}; bugreport!() .info(SoftwareVersion::default()) @@ -252,7 +252,7 @@ fn run() -> Result { .info(FileContent::new("Config file", config_file())) .info(CompileTimeInformation::default()) .info(CommandOutput::new("Less version", "less", &["--version"])) - .print_markdown(); + .print::(); return Ok(true); } From 26136be9037e246b1d2cc5503c760e6e2ebb1491 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 6 Jan 2021 22:25:23 +0100 Subject: [PATCH 16/21] Add --diagnostics alias --- src/bin/bat/clap_app.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index b2ebb6f7..87cb2a65 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -480,6 +480,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { .arg( Arg::with_name("diagnostic") .long("diagnostic") + .alias("diagnostics") .hidden_short_help(true) .help("Show diagnostic information for bug reports.") ) From 2b44940f81cb2bfcf9747a0ad23d1f1a5545aea7 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 6 Jan 2021 22:55:12 +0100 Subject: [PATCH 17/21] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c04f8e97..419be6d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Features + - Use a pager when `bat --list-languages` is called, see #1394 (@stku1985) ## Bugfixes @@ -15,6 +16,7 @@ ## Other - Performance improvements, see #1421 (@LovecraftianHorror) +- Added a new `--diagnostic` option to collect information for bug reports, see #1459 (@sharkdp) ## Syntaxes From c67b43975248c0ad3e4e699623f05f472fc48a9a Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 21:27:16 +0100 Subject: [PATCH 18/21] CICD: Build: Enable x86_64-pc-windows-gnu again All the referenced issues [1] have been Closed, so use "stable" for everything. Now `i686-w64-mingw32-gcc` fails with this instead error: linker `i686-w64-mingw32-gcc` not found so keep it disabled. There is probably a simple solution for this that is obvious to someone used to cross-compiling Rust programs on Windows... [1] https://github.com/rust-lang/rust/issues/47048 https://github.com/rust-lang/rust/issues/53454 https://github.com/rust-lang/cargo/issues/6754 --- .github/workflows/CICD.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 8f6696b9..85838867 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -92,9 +92,9 @@ jobs: - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: use-cross } - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu } - { os: macos-latest , target: x86_64-apple-darwin } - # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; linker errors (missing '_imp____acrt_iob_func') + # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found - { os: windows-latest , target: i686-pc-windows-msvc } - # - { os: windows-latest , target: x86_64-pc-windows-gnu } ## disabled; linker errors (missing '_imp____acrt_iob_func') + - { os: windows-latest , target: x86_64-pc-windows-gnu } - { os: windows-latest , target: x86_64-pc-windows-msvc } steps: - name: Git checkout @@ -112,8 +112,6 @@ jobs: run: | # toolchain TOOLCHAIN="stable" ## default to "stable" toolchain - # * specify alternate TOOLCHAIN for *-pc-windows-gnu targets; gnu targets on Windows are broken for the standard *-pc-windows-msvc toolchain (refs: , , ) - case ${{ matrix.job.target }} in *-pc-windows-gnu) TOOLCHAIN="stable-${{ matrix.job.target }}" ;; esac; # * use requested TOOLCHAIN if specified if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi echo ::set-output name=TOOLCHAIN::${TOOLCHAIN} From 63460f4bf94ea5a8706272faba507fd645d0d07d Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 6 Jan 2021 21:51:00 +0100 Subject: [PATCH 19/21] CICD: Build: Remove conditional TOOLCHAIN logic because we always use "stable". If we need to go back to using matrix.job.toolchain, we should do it like in jobs.coverage, instead of messing about with vars and outputs. --- .github/workflows/CICD.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 85838867..8c8b4c26 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -83,7 +83,7 @@ jobs: fail-fast: false matrix: job: - # { os, target, cargo-options, features, use-cross, toolchain } + # { os, target, cargo-options, features, use-cross } - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: use-cross } - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: use-cross } - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: use-cross } @@ -110,11 +110,6 @@ jobs: id: vars shell: bash run: | - # toolchain - TOOLCHAIN="stable" ## default to "stable" toolchain - # * use requested TOOLCHAIN if specified - if [ -n "${{ matrix.job.toolchain }}" ]; then TOOLCHAIN="${{ matrix.job.toolchain }}" ; fi - echo ::set-output name=TOOLCHAIN::${TOOLCHAIN} # staging directory STAGING='_staging' echo ::set-output name=STAGING::${STAGING} @@ -194,7 +189,7 @@ jobs: - name: Install Rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ steps.vars.outputs.TOOLCHAIN }} + toolchain: stable target: ${{ matrix.job.target }} override: true profile: minimal # minimal component installation (ie, no documentation) From 3ed83913b2163b43d58991992c064302d7bfd230 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Thu, 7 Jan 2021 09:35:50 +0100 Subject: [PATCH 20/21] CICD: Build: Remove unused REF_* outputs There is no usage of `steps.vars.outputs.REF_*` so no need to setup such things. Also remove setting up REF_NAME and REF_BRANCH env vars, since they are never read. --- .github/workflows/CICD.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 8c8b4c26..0bb1f705 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -117,14 +117,8 @@ jobs: EXE_suffix="" ; case ${{ matrix.job.target }} in *-pc-windows-*) EXE_suffix=".exe" ;; esac; echo ::set-output name=EXE_suffix::${EXE_suffix} # parse commit reference info - REF_NAME=${GITHUB_REF#refs/*/} - unset REF_BRANCH ; case ${GITHUB_REF} in refs/heads/*) REF_BRANCH=${GITHUB_REF#refs/heads/} ;; esac; unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac; REF_SHAS=${GITHUB_SHA:0:8} - echo ::set-output name=REF_NAME::${REF_NAME} - echo ::set-output name=REF_BRANCH::${REF_BRANCH} - echo ::set-output name=REF_TAG::${REF_TAG} - echo ::set-output name=REF_SHAS::${REF_SHAS} # parse target unset TARGET_ARCH ; case ${{ matrix.job.target }} in arm-unknown-linux-gnueabihf) TARGET_ARCH=arm ;; i686-*) TARGET_ARCH=i686 ;; x86_64-*) TARGET_ARCH=x86_64 ;; esac; echo ::set-output name=TARGET_ARCH::${TARGET_ARCH} From b6b7262962ab67d34ad98788aff6ed78f1e763e3 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Thu, 7 Jan 2021 09:05:30 +0100 Subject: [PATCH 21/21] CICD: Build: Use matrix.job.use-cross directly There is no need for a var and set-output detour. --- .github/workflows/CICD.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 0bb1f705..91533085 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -84,12 +84,12 @@ jobs: matrix: job: # { os, target, cargo-options, features, use-cross } - - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: use-cross } - - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: use-cross } - - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: use-cross } - - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , use-cross: use-cross } + - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , use-cross: true } + - { os: ubuntu-18.04 , target: aarch64-unknown-linux-gnu , use-cross: true } + - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , use-cross: true } + - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , use-cross: true } - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu } - - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: use-cross } + - { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , use-cross: true } - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu } - { os: macos-latest , target: x86_64-apple-darwin } # - { os: windows-latest , target: i686-pc-windows-gnu } ## disabled; error: linker `i686-w64-mingw32-gcc` not found @@ -159,9 +159,6 @@ jobs: if [[ -n $DPKG_ARCH && -n $DPKG_VERSION ]]; then DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" ; fi echo ::set-output name=DPKG_NAME::${DPKG_NAME} # target-specific options - # * CARGO_USE_CROSS (truthy) - CARGO_USE_CROSS='true' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) unset CARGO_USE_CROSS ;; esac; - echo ::set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS} # # * `arm` cannot be tested on ubuntu-* hosts (b/c testing is currently primarily done via comparison of target outputs with built-in outputs and the `arm` target is not executable on the host) JOB_DO_TESTING="true" case ${{ matrix.job.target }} in arm-*) unset JOB_DO_TESTING ;; esac; @@ -199,49 +196,49 @@ jobs: - name: Build uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: build args: --release --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} - name: Test uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: test args: --target=${{ matrix.job.target }} ${{ steps.vars.outputs.CARGO_TEST_OPTIONS}} ${{ matrix.job.cargo-options }} - name: bat test run uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: run args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs - name: bat diagnostics output uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: run args: --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} -- --paging=never --color=always --theme=ansi Cargo.toml src/config.rs --diagnostic - name: Check features regex-onig uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: check args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig - name: Check features regex-onig,git uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: check args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git - name: Check features regex-onig,paging uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: check args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,paging - name: Check features regex-onig,git,paging uses: actions-rs/cargo@v1 with: - use-cross: ${{ steps.vars.outputs.CARGO_USE_CROSS }} + use-cross: ${{ matrix.job.use-cross }} command: check args: --target=${{ matrix.job.target }} --verbose --lib --no-default-features --features regex-onig,git,paging - name: Upload build artifacts