From 6afe527ddf13231b148792a09e2a51382f496baa Mon Sep 17 00:00:00 2001 From: MohammedKHC0 Date: Tue, 3 Jun 2025 20:18:41 +0300 Subject: [PATCH] Building rust-analyzer using release config. When rust analyzer is built without CFG_RELEASE env it spams lsp with multiple warning when the main loop take too long to process a message. See this issue for more details https://github.com/rust-lang/rust-analyzer/blob/debaef80be92d957f52d6e89c86286556075ea47/crates/rust-analyzer/build.rs#L9 --- packages/rust-analyzer/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/rust-analyzer/build.sh b/packages/rust-analyzer/build.sh index 80ef0e61aa0773..224293490e120e 100644 --- a/packages/rust-analyzer/build.sh +++ b/packages/rust-analyzer/build.sh @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, MIT" TERMUX_PKG_LICENSE_FILE="LICENSE-APACHE, LICENSE-MIT" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="20250602" +TERMUX_PKG_REVISION=1 _VERSION=${TERMUX_PKG_VERSION:0:4}-${TERMUX_PKG_VERSION:4:2}-${TERMUX_PKG_VERSION:6:2} TERMUX_PKG_SRCURL=https://github.com/rust-lang/rust-analyzer/archive/refs/tags/${_VERSION}.tar.gz TERMUX_PKG_SHA256=c993bee4845acc400e6b6b499dadb50eafca02fab4e38001663fc6003ecec623 @@ -56,6 +57,7 @@ termux_step_pre_configure() { } termux_step_make() { + export CFG_RELEASE=1 cargo build --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release }