From a1b1feb247ca3d8f1428d61a4603586d6745f871 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 3 Nov 2025 23:21:24 +0200 Subject: [PATCH 1/7] Revert "Bump assets/syntaxes/02_Extra/Docker from `0f6b7bc` to `c001fb2` (#3024)" This reverts commit 3838766dd4464e93630a5f274b1357cef47d8835. --- assets/syntaxes/02_Extra/Docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/syntaxes/02_Extra/Docker b/assets/syntaxes/02_Extra/Docker index c001fb28..0f6b7bc8 160000 --- a/assets/syntaxes/02_Extra/Docker +++ b/assets/syntaxes/02_Extra/Docker @@ -1 +1 @@ -Subproject commit c001fb280561d7c16f0f2837d76af493cf6c3bf8 +Subproject commit 0f6b7bc87acf684f7b0790fd480731ffb4615b87 From 6884a8e7e0d4ee779adb8d9d36cba1b0fc8f4e28 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 3 Nov 2025 23:24:35 +0200 Subject: [PATCH 2/7] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9993c0cd..a22109d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix hang when using `--list-themes` with an explicit pager, see #3457 (@abhinavcool42) - Fix negative values of N not being parsed in line ranges without `=` flag value separator, see #3442 (@lmmx) +- Fix broken Docker syntax preventing use of custom assets, see #3476 (@keith-hall) ## Other - Improve README documentation on pager options passed to less, see #3443 (@injust) From a4212e99b019acc452a876b789ff25247b64f583 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 24 Nov 2025 22:05:31 +0200 Subject: [PATCH 3/7] Patch Dockerfile to replace reference to non-existent context --- assets/patches/Dockerfile-bash.sublime-syntax.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 assets/patches/Dockerfile-bash.sublime-syntax.patch diff --git a/assets/patches/Dockerfile-bash.sublime-syntax.patch b/assets/patches/Dockerfile-bash.sublime-syntax.patch new file mode 100644 index 00000000..390685b9 --- /dev/null +++ b/assets/patches/Dockerfile-bash.sublime-syntax.patch @@ -0,0 +1,11 @@ +--- syntaxes/02_Extra/Docker/Syntaxes/Dockerfile-bash.sublime-syntax ++++ syntaxes/02_Extra/Docker/Syntaxes/Dockerfile-bash.sublime-syntax +@@ -50,7 +50,7 @@ + 1: keyword.control.dockerfile + push: + - match: (?=\s*\[) +- set: scope:source.json#arrays ++ set: scope:source.json#array + with_prototype: + - match: \n + pop: true From efa9f0e63dadde9cdd4e401a08ffc04812d84785 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 24 Nov 2025 22:16:51 +0200 Subject: [PATCH 4/7] add integration test to prove that building the cache finds all contexts --- tests/integration_tests.rs | 46 +++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 27ee6add..5dc35d6e 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1599,7 +1599,7 @@ Clearing metadata file ... okay", #[cfg(unix)] #[test] -fn cache_build() { +fn cache_build_blank() { let src_dir = "cache_source"; let tmp_dir = tempdir().expect("can create temporary directory"); let tmp_themes_path = tmp_dir.path().join("themes.bin"); @@ -1642,6 +1642,50 @@ Writing metadata to folder .* ... okay", assert!(tmp_metadata_path.exists()); } +#[cfg(unix)] +#[test] +fn cache_build() { + let src_dir = "cache_source"; + let tmp_dir = tempdir().expect("can create temporary directory"); + let tmp_themes_path = tmp_dir.path().join("themes.bin"); + let tmp_syntaxes_path = tmp_dir.path().join("syntaxes.bin"); + let tmp_acknowledgements_path = tmp_dir.path().join("acknowledgements.bin"); + let tmp_metadata_path = tmp_dir.path().join("metadata.yaml"); + + // Build the cache + // Include the BAT_CONFIG_PATH and BAT_THEME environment variables to ensure that + // options loaded from a config or the environment are not inserted + // before the cache subcommand, which would break it. + bat_with_config() + .current_dir(Path::new(EXAMPLES_DIR).join(src_dir)) + .env("BAT_CONFIG_PATH", "bat.conf") + .env("BAT_THEME", "1337") + .arg("cache") + .arg("--build") + // removed --blank + .arg("--source") + .arg(".") + .arg("--target") + .arg(tmp_dir.path().to_str().unwrap()) + .arg("--acknowledgements") + .assert() + .success() + .stdout( + predicate::str::is_match( + "Writing theme set to .*/themes.bin ... okay\nWriting syntax set to .*/syntaxes.bin ... okay\nWriting acknowledgements to .*/acknowledgements.bin ... okay\nWriting metadata to folder .* ... okay", + ) + .unwrap(), + ) + .stdout(predicate::str::contains("Some referenced contexts could not be found!").not()) + ; + + // Now we expect the files to exist. If they exist, we assume contents are correct + assert!(tmp_themes_path.exists()); + assert!(tmp_syntaxes_path.exists()); + assert!(tmp_acknowledgements_path.exists()); + assert!(tmp_metadata_path.exists()); +} + #[test] fn utf16() { // The output will be converted to UTF-8 with the leading UTF-16 From f8b6a009cbb738db79a868c55dfb899a02969fb2 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 24 Nov 2025 22:30:34 +0200 Subject: [PATCH 5/7] commit syntax dump to get integration tests to pass --- assets/syntaxes.bin | Bin 1006290 -> 1006277 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/syntaxes.bin b/assets/syntaxes.bin index 3e3ab9708975feadaa36ca7c2dc9f74a1fd57497..73d454a81cbb58f8f09b6e0910ed25d756eb1424 100644 GIT binary patch delta 847 zcmV-V1F-zkwLQhPJ%EG(gaU*Egam{Iga(8Mvie6Oz-v;?v}fm z#6s%re=P$iJY4F%ZG|rs20Td!lUZsw+*kM*TxvLdqmcYfL1PebCLu&31`i$|B5r6*+zHO2^;C8YD$T-gRNk@#xnq&*$4f3g zA)k3A+ugpAsKzse>6`^}jwR*Hy^W}Z7Q{fN>R2}>IHYV^A-884Gy083P17}Ma2b*t zf6D0U(Qe=g5w#7S$q0CG9FJZ&oK5C54w0XoBCn8$Im?42%)z`^rkpZ~kUuFcb}bye zS2!cfTP{Mkm_CBXl?ZJmR9~}dgpC2>FwC)-LV$}r;OR1ldB-!7M+C<*3L+BB@)%D@ zoM#b<;aBoBqf>_Ce4Y`JFL*ppNDfiXe_)n^-7>eHrQp}+X0q|wc!SG`2seYdOmRF& zh>UpHLX931ziQ#UHK-{D@WX_MBsM#TXLxJtr*l2MhkknZ`yPHS@2^iC@8U~MfII{; zXL#}B8ae*eDMH@bUi+XB%8$yW%Wy*6)oHf0)loyUWF*A`OD0HtIwhIxZ(Q+ajIR|gu%LJX_X;pNC4<75t?{>?U2od>XgK;g_~Wx{$AvMz z8sKKc>Z8S_aZIMTR`>nR#usCC7l7JsvD&@6ssNZyn{{Nr?biDbm?MW0hvSzBhvSzC ZhvSzDhvSzEhvSzFhvSzGx8s)%@4~nBq~ZVo delta 860 zcmV-i1Ec)KwLQ|cJ%EG(gaU*Egam{Iga(8Mv`7TCO9hoP6=7B_)ntFabaG9)EkP#4%wADv3Btwv6xL+FS! z`SBA;`Ji*ZUMP8lD5Im8a2!c8$71v)?=+Xy@>E+o>nzW-Wmm~}{uqg5J(V4UO0ySM8gE%ZZd>+uEc?5b{k3QL}^5|GNdaL9VFK!r*{c<32mevs3N~pP}b%ZMcqBt%Pp8&vl5wUzxzzAdl z7YRnGOriuw(;`JkfV{ z?ygSU;QVuA!wWpva|h?&uRJ%rJn_6>ZLhsk63UOrg-=n2{pD%4wAF_d%_4A)e>jqi zw=~&d)s7TyaA+qAg~3U*B2+sc->UgiR&06AdS$&1;G`h;l9-YMMFIQ+-O>_?rJc#m zmW7-5ma{Dbw$O99f>I2r`tYgHkI4iJ+1t3{O^h# Date: Tue, 25 Nov 2025 22:43:58 +0200 Subject: [PATCH 6/7] Revert "Patch Dockerfile to replace reference to non-existent context" This reverts commit a4212e99b019acc452a876b789ff25247b64f583. No longer needed because we reverted the Docker submodule. --- assets/patches/Dockerfile-bash.sublime-syntax.patch | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 assets/patches/Dockerfile-bash.sublime-syntax.patch diff --git a/assets/patches/Dockerfile-bash.sublime-syntax.patch b/assets/patches/Dockerfile-bash.sublime-syntax.patch deleted file mode 100644 index 390685b9..00000000 --- a/assets/patches/Dockerfile-bash.sublime-syntax.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- syntaxes/02_Extra/Docker/Syntaxes/Dockerfile-bash.sublime-syntax -+++ syntaxes/02_Extra/Docker/Syntaxes/Dockerfile-bash.sublime-syntax -@@ -50,7 +50,7 @@ - 1: keyword.control.dockerfile - push: - - match: (?=\s*\[) -- set: scope:source.json#arrays -+ set: scope:source.json#array - with_prototype: - - match: \n - pop: true From 961f367ca8c8cad7f73aac10fa3b7fbd058eb9c4 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Wed, 26 Nov 2025 22:07:06 +0200 Subject: [PATCH 7/7] use newer MacOS runner images otherwise CI fails due to the brownout https://github.com/actions/runner-images/issues/13046 --- .github/workflows/CICD.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 43f28cd1..6274941a 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -161,19 +161,19 @@ jobs: fail-fast: false matrix: job: - - { target: aarch64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true } - - { target: aarch64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true } - - { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest, dpkg_arch: armhf, use-cross: true } - - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest, dpkg_arch: musl-linux-armhf, use-cross: true } - - { target: i686-pc-windows-msvc , os: windows-2025, } - - { target: i686-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: i686, use-cross: true } - - { target: i686-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-i686, use-cross: true } - - { target: x86_64-apple-darwin , os: macos-13, } - - { target: aarch64-apple-darwin , os: macos-14, } - - { target: x86_64-pc-windows-msvc , os: windows-2025, } - - { target: aarch64-pc-windows-msvc , os: windows-11-arm, } - - { target: x86_64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: amd64, use-cross: true } - - { target: x86_64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-amd64, use-cross: true } + - { target: aarch64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true } + - { target: aarch64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true } + - { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest , dpkg_arch: armhf, use-cross: true } + - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest , dpkg_arch: musl-linux-armhf, use-cross: true } + - { target: i686-pc-windows-msvc , os: windows-2025 , } + - { target: i686-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: i686, use-cross: true } + - { target: i686-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-i686, use-cross: true } + - { target: x86_64-apple-darwin , os: macos-15-intel, } + - { target: aarch64-apple-darwin , os: macos-latest , } + - { target: x86_64-pc-windows-msvc , os: windows-2025 , } + - { target: aarch64-pc-windows-msvc , os: windows-11-arm, } + - { target: x86_64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: amd64, use-cross: true } + - { target: x86_64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-amd64, use-cross: true } env: BUILD_CMD: cargo steps: