From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60961: 29.0.60; Compiling emacs-29 without treesitter outputs warnings Date: Fri, 20 Jan 2023 15:36:27 +0200 Message-ID: <831qnpnx9g.fsf@gnu.org> References: <878rhx1os6.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60961@debbugs.gnu.org To: Robert Pluim , Yuan Fu , Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 14:37:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIra1-0000dB-VZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 14:37:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrZo-0007Ya-4c; Fri, 20 Jan 2023 08:37:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrZm-0007Wt-JC for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIrZm-0005yu-Ba for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIrZl-00007a-Vh for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60961 X-GNU-PR-Package: emacs Original-Received: via spool by 60961-submit@debbugs.gnu.org id=B60961.1674221803431 (code B ref 60961); Fri, 20 Jan 2023 13:37:01 +0000 Original-Received: (at 60961) by debbugs.gnu.org; 20 Jan 2023 13:36:43 +0000 Original-Received: from localhost ([127.0.0.1]:45865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIrZS-00006r-G6 for submit@debbugs.gnu.org; Fri, 20 Jan 2023 08:36:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIrZQ-00006b-IC for 60961@debbugs.gnu.org; Fri, 20 Jan 2023 08:36:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrZG-0005mJ-5p; Fri, 20 Jan 2023 08:36:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=08BEtQ3pYvjbqVAGB6OrJVbJhvP6kVM+cuQj7BcKo30=; b=XBpyqMIGiZ6m ItzUGsakxew8nC7aDhORo2XOu8RBmg4wc4zGxzDOOcoh0rYF5tcRh7Wa+2HDnou+lHomwbVJ3Jp6U qITWQgeyNKLFW+ndcMoIHoqd4TnBrMZWxjaVkxUQEB0VbhK5TN4iAiuJgL2tEWKVGuoaWfW8noRMO FeKhkvbSXH+M8CUQTc0CgWm2++Gi8G1Df2KZyp69N2pMFlvkRqqjU2vVGzWAkFLeoMETW3j9Cw9aB 0KwWuFqa6VzXKVliDY1suu2ZkyzeuodWLjKsf8VhemPv7KI8fVRGTwK/9bZmYTM3oCZeaZpyM/o1+ whA2x+BP79xom3mQUaEFpg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrZE-00017q-Lp; Fri, 20 Jan 2023 08:36:29 -0500 In-Reply-To: <878rhx1os6.fsf@gmail.com> (message from Robert Pluim on Fri, 20 Jan 2023 11:30:33 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253771 Archived-At: > From: Robert Pluim > Date: Fri, 20 Jan 2023 11:30:33 +0100 > > > This is emacs-29 as of 6b2f85caa6c > > ELC progmodes/csharp-mode.elc > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > ELC progmodes/dockerfile-ts-mode.elc > ELC progmodes/go-ts-mode.elc > ELC progmodes/java-ts-mode.elc > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > ELC progmodes/js.elc > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > ELC progmodes/json-ts-mode.elc > ELC progmodes/python.elc > ELC progmodes/ruby-mode.elc > ELC progmodes/ruby-ts-mode.elc > ELC progmodes/rust-ts-mode.elc > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > ELC progmodes/typescript-ts-mode.elc > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs > Warning (treesit): Cannot activate tree-sitter, because tree-sitter library is not compiled with Emacs Yes, I've seen these as well. The reason is that some modes 'require' c-ts-mode, because they want to use their comment-related functions. But the changes I made recently call treesit-ready-p when c-ts-mode is being loaded, and that emits the warning. I can shut up the warning by calling treesit-ready-p with a non-nil QUIET argument, but then the warning will not be emitted if users load c-ts-mode from their init files or manually, which is not good. I tried several other solutions, but they either didn't work or were not clean enough for my palate. Yuan/Theo, please find a solution for this. If no better idea comes up, I think the c-ts-mode functions that other modes want to use should be moved to a separate file, and that file that can be 'require'd by all those which want it, including by c-ts-mode.el. TIA.