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 15:43:33 +0100 Message-ID: <87h6wll10q.fsf@thornhill.no> References: <878rhx1os6.fsf@gmail.com> <831qnpnx9g.fsf@gnu.org> <87o7qtuxgh.fsf@thornhill.no> <83tu0lmgv6.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="4906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, casouri@gmail.com, 60961@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 15:44:37 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 1pIsd7-0000wF-Gq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 15:44:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIsce-0005Ub-Ra; Fri, 20 Jan 2023 09:44: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 1pIscd-0005U5-4b for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 09:44:03 -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 1pIscc-0001kU-IA for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 09:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIscc-0004Um-Dg for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 09:44: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 14:44: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.167422582017225 (code B ref 60961); Fri, 20 Jan 2023 14:44:02 +0000 Original-Received: (at 60961) by debbugs.gnu.org; 20 Jan 2023 14:43:40 +0000 Original-Received: from localhost ([127.0.0.1]:46015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIscF-0004Tk-Oj for submit@debbugs.gnu.org; Fri, 20 Jan 2023 09:43:40 -0500 Original-Received: from out0.migadu.com ([94.23.1.103]:26449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIscD-0004TY-Cc for 60961@debbugs.gnu.org; Fri, 20 Jan 2023 09:43:38 -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=1674225815; 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=OyzN/PsoZ9KdpNmqPP02aO0+fYA9oDwfAfj/1zxUwc0=; b=EhR3TsxPCVPeabvD9AtEvYWUuM/HI4AEIi6JyalXORHoXDl07PSrm3wty3fqIpTc240fIr ykGSkMnB3PPLLyposO8/UjCEFbYB+CKBL4AkSVVn6erg/rvAI1APt6FqnakdIoJ1fSavwO UnfNHsbZ1HcK/+S67tOKKymvEgcAggnKGPF7+C3RcCBkpUtEg80oHgnILh2FzYJNju6BF3 R/g7egnm8aSvB4TKz+Sh+81kPm2kn0aOreuphT2dXLEHoaFgdYutUzAiCW4XwR3GQ5EyqG FIFaeh18afbi05FFt306xmSJCaPgfIB6JIzZuEO6Ezdp7bcU3/jPPix0zdW0IA== In-Reply-To: <83tu0lmgv6.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:253780 Archived-At: Eli Zaretskii writes: >> From: Theodor Thornhill >> Cc: 60961@debbugs.gnu.org >> Date: Fri, 20 Jan 2023 14:50:22 +0100 >> >> Eli Zaretskii writes: >> >> > 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? > > I tend to the "lib" method. Mostly because several modes, including > some that are unrelated to C, want the code which was written for > C/C++, and so it is possible that there's some general feature here > waiting for us to refactor the code -- in which case perhaps the code > should be in treesit.el? > > IOW, how come JS, Rust, and Typescript all want comment-related setup > that was written for C? If this is just a coincidence, then perhaps > duplicating the code is a better idea, but if there's some underlying > commonality, we should have common code in treesit.el, or maybe in > some c-ts-common.el? I can start by moving it into treesit.el, then we can maybe extract something out later. Sounds good? I can do it tonight, unless any of you object :) Theo