From 8479666731847f3888e311e23aa1912fb21f9144 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 3 Oct 2023 13:18:10 +0200 Subject: [PATCH] cli: Disable `ruby` highlighting by default See code comment for reasoning. --- radicle-cli/Cargo.toml | 4 +++- radicle-cli/src/terminal/highlight.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index 6058bc3dc..cf6738764 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -38,7 +38,9 @@ tree-sitter-css = { version = "0.19" } tree-sitter-toml = { version = "0.20" } tree-sitter-c = { version = "0.20" } tree-sitter-python = { version = "0.20" } -tree-sitter-ruby = { version = "0.20" } +# N.b. This crate has a C++ token scanner that causes problems when building +# for the musl target. Hence it is optional for now. +tree-sitter-ruby = { version = "0.20", optional = true } tree-sitter-bash = { version = "0.20" } tree-sitter-go = { version = "0.20.0" } tree-sitter-md = { version = "0.1.5" } diff --git a/radicle-cli/src/terminal/highlight.rs b/radicle-cli/src/terminal/highlight.rs index a994d6042..6c86e66d6 100644 --- a/radicle-cli/src/terminal/highlight.rs +++ b/radicle-cli/src/terminal/highlight.rs @@ -285,6 +285,7 @@ impl Highlighter { ) .expect("Highlighter::config: highlight configuration must be valid") })), + #[cfg(feature = "tree-sitter-ruby")] "ruby" => Some(self.configs.entry(language).or_insert_with(|| { ts::HighlightConfiguration::new( tree_sitter_ruby::language(),