What steps will reproduce the bug?
- Up-to-date Arch system
cargo install bat
- Oh, I guess
onig-sys is broken. Let's try application minus regex-onig: cargo install bat --no-default-features --features regex-fancy,wild,paging,etcetera,clap,bugreport,build-assets,git
Workaround: CC=clang cargo install bat. (In case anyone is reading this looking for a solution.)
What happens?
Extremely long error spew about onig-sys failing to compile when installing the default. When trying to reassemble application, a much simpler error:
error[E0425]: cannot find function `get_pager_executable` in module `bat::config`
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bat-0.25.0/src/bin/bat/main.rs:283:30
|
283 | let pager = bat::config::get_pager_executable(
| ^^^^^^^^^^^^^^^^^^^^ not found in `bat::config`
|
note: found an item that was configured out
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bat-0.25.0/src/config.rs:113:8
|
113 | pub fn get_pager_executable(config_pager: Option<&str>) -> Option<String> {
| ^^^^^^^^^^^^^^^^^^^^
note: the item is gated here
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bat-0.25.0/src/config.rs:112:1
|
112 | #[cfg(all(feature = "minimal-application", feature = "paging"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
What did you expect to happen instead?
cargo install bat should work. Failing that, don't gate mandatory functionality behind feature groups, so it's at least clear without spelunking whether this is even possible. If this is an actual requirement, tie it to the actual feature required; if it's not required, delete it.
How did you install bat?
You get one guess /lighthearted
bat version and environment
bat version: 0.25.0 is what it's trying to install. Obviously with install broken I can't use --diagnostic.
environment: Fully up-to-date Arch system where cc means gcc 15.1.1 20250425
What steps will reproduce the bug?
cargo install batonig-sysis broken. Let's tryapplicationminusregex-onig:cargo install bat --no-default-features --features regex-fancy,wild,paging,etcetera,clap,bugreport,build-assets,gitWorkaround:
CC=clang cargo install bat. (In case anyone is reading this looking for a solution.)What happens?
Extremely long error spew about
onig-sysfailing to compile when installing the default. When trying to reassembleapplication, a much simpler error:What did you expect to happen instead?
cargo install batshould work. Failing that, don't gate mandatory functionality behind feature groups, so it's at least clear without spelunking whether this is even possible. If this is an actual requirement, tie it to the actual feature required; if it's not required, delete it.How did you install
bat?You get one guess /lighthearted
bat version and environment
batversion:0.25.0is what it's trying to install. Obviously with install broken I can't use--diagnostic.environment: Fully up-to-date Arch system where
ccmeansgcc 15.1.1 20250425