From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60961: 29.0.60; Compiling emacs-29 without treesitter outputs warnings Date: Fri, 20 Jan 2023 14:50:22 +0100 Message-ID: <87o7qtuxgh.fsf@thornhill.no> References: <878rhx1os6.fsf@gmail.com> <831qnpnx9g.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35244"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60961@debbugs.gnu.org To: Eli Zaretskii , Robert Pluim , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 14:51:16 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 1pIrnX-0008zB-BO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 14:51:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrnQ-0006BV-7N; Fri, 20 Jan 2023 08:51:08 -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 1pIrnK-00068g-UY for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:51:04 -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 1pIrnK-0000oV-Mt for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIrnK-0000lZ-JJ for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 08:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 13:51:02 +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.16742226292885 (code B ref 60961); Fri, 20 Jan 2023 13:51:02 +0000 Original-Received: (at 60961) by debbugs.gnu.org; 20 Jan 2023 13:50:29 +0000 Original-Received: from localhost ([127.0.0.1]:45895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIrmm-0000kT-Na for submit@debbugs.gnu.org; Fri, 20 Jan 2023 08:50:29 -0500 Original-Received: from out-116.mta0.migadu.com ([91.218.175.116]:14396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIrmk-0000kK-4X for 60961@debbugs.gnu.org; Fri, 20 Jan 2023 08:50:27 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1674222623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CIHx0VFXnSiNd3NCrBei+PUSTtBDfpb0EZukQgE5Mvg=; b=O3m6fQNsbuQBPYzgnHpx1dFnJBYfsxE1xuqwv8Pg3WByicvMSTIUeuFc6Midlhu+4CAXFj wLSjL7kHn8Z/n1sg7C9qW3gftLCleMJK9yro+4PjWaS7K08IqZXJTnEqB8NP8x5ZWG6Uaf ttuog0C1RMhNni5js50ajLFlkMuIfdOrQu8QFRFqJ0yOOi/THSNF+TCWdkPiPX4wY2Kiio dg6LJshTlw07DVqaMrihVd7NxkC/hwnsw59Bx3raf8CB6VbsrjD+MOC7YPPq9X1AfNJCk9 FjBpdXkvNAbTgF9j8HAfdVxHVhbQnDkyfu8ypHlj+KpU1IYqBnC1uX/acAF2iA== In-Reply-To: <831qnpnx9g.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT 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:253773 Archived-At: Eli Zaretskii writes: >> 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. > Yeah, I was hoping to actually just allowing some duplication of code, until some "best practice" emerges the coming months, and we can make a treesit-common-lib.el or something like that. So I can either just make sure that no modes require across modes, or make that "lib" right now. What do you think? Theo