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#60659: 30.0.50; tree-sitter: identical nodes are not `equal' Date: Tue, 10 Jan 2023 15:11:20 +0200 Message-ID: <83bkn6o7pj.fsf@gnu.org> References: <1B5F5D8C-8DD3-4ED1-95C2-E975461BC5FC@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60659@debbugs.gnu.org To: Yuan Fu , Lars Ingebrigtsen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 10 17:46: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 1pFHlR-0006su-9V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Jan 2023 17:46:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFEQD-0003zu-2y; Tue, 10 Jan 2023 08:12:09 -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 1pFEQ6-0003xd-QG for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 08:12: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 1pFEQ6-0000lt-IC for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 08:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFEQ6-00050A-64 for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 08:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Jan 2023 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60659 X-GNU-PR-Package: emacs Original-Received: via spool by 60659-submit@debbugs.gnu.org id=B60659.167335626419147 (code B ref 60659); Tue, 10 Jan 2023 13:12:02 +0000 Original-Received: (at 60659) by debbugs.gnu.org; 10 Jan 2023 13:11:04 +0000 Original-Received: from localhost ([127.0.0.1]:39128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFEP9-0004yl-NG for submit@debbugs.gnu.org; Tue, 10 Jan 2023 08:11:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFEP8-0004yF-81 for 60659@debbugs.gnu.org; Tue, 10 Jan 2023 08:11:02 -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 1pFEOy-0000bL-Ip; Tue, 10 Jan 2023 08:10:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Qx+y7bFSHt1hl0G3XtAmIu0kiRMamU/p/J4YZRL+qYk=; b=OfmifuFeViauwxjVhUhf 9cxxCSlSwPa1/wZTgwp5YDJigcFDpqFggoDVS8DB79ca9CWeW4qUR7V7GP4t0VpuGOSfmWFvCGgLx S9kJZ44pFRjHMBdbZXF5YEj7WdizXtTcdVm9QLy4zqlRJqfpVx8KNLTnazlHHhwcRfwEd3JVmM1cE Au3WPh2Hk0VGu24GvZEq2oThINndcgU9+4SNDwUOOMv4XyJlpLtSBUEA5dLU1nOkg50sLWQ+AirAy ENOMTZv0U4hiQDmf2ApsDwqIwYU/M4TJ8Gmbt2KSoQ4AYrxR10f1qsMZGnEZY1VXga6pg5MJDGmrT d6NS4PJ7PJ0B+Q==; 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 1pFEOx-0006VW-SR; Tue, 10 Jan 2023 08:10:52 -0500 In-Reply-To: <1B5F5D8C-8DD3-4ED1-95C2-E975461BC5FC@gmail.com> (message from Yuan Fu on Mon, 9 Jan 2023 21:56:19 -0800) 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:253089 Archived-At: > From: Yuan Fu > Date: Mon, 9 Jan 2023 21:56:19 -0800 > Cc: 60659@debbugs.gnu.org > > Eli, does this look right to you? In particular, I’m not sure if it’s ok to call a lisp function (Ftreesit_node_eq) inside internal_equal, even though it never signals. It is better to make a C function from most of the body of Ftreesit_node_eq, but without the CHECK_NODE parts, and make both Fequal and Ftreesit_node_eq call that. Because CHECK_NODE can signal, right? Also, you should make sure up front that _both_ o1 and o2 are treesit nodes, otherwise they cannot be 'equal'. Lars, Stefan: any comments/suggestions?