From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 23 09:38:25 2023 Received: (at submit) by debbugs.gnu.org; 23 Dec 2023 14:38:25 +0000 Received: from localhost ([127.0.0.1]:48839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rH38x-0004QW-Gg for submit@debbugs.gnu.org; Sat, 23 Dec 2023 09:38:25 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rH38u-0004QH-B9 for submit@debbugs.gnu.org; Sat, 23 Dec 2023 09:38:22 -0500 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 1rH38j-0006Pc-8j for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 09:38:09 -0500 Received: from forward100a.mail.yandex.net ([178.154.239.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rH38d-0003Zl-Vk for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2023 09:38:08 -0500 Received: from mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net [IPv6:2a02:6b8:c18:4001:0:640:bc2:0]) by forward100a.mail.yandex.net (Yandex) with ESMTP id D774B46C8A for ; Sat, 23 Dec 2023 17:37:58 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id wbR5KtARs4Y0-z2qSb2jE; Sat, 23 Dec 2023 17:37:58 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1703342278; bh=J2HDiUgmU6wMSpAxVAw/ExceRYiLwGo7HmEFMJ5wkF8=; h=Message-ID:Date:From:Subject:To; b=s+nzokZaaknuI5o4SUfHTUa/sJC2IZlroVGPP8kbxV+zROJREVchoe7b+zHZ6hJxG 1OeAeHCKQAzCQ8DaqYpZrx+t9A22M+uPGgfAoFV7h+irQIUXkQA+QCNL+gaUizJQLE hKNUcSmV6O8EKx8KklzWfSaEmjpAAlfTed5zAbH8= Authentication-Results: mail-nwsmtp-smtp-production-main-81.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Denis Zubarev To: bug-gnu-emacs@gnu.org Subject: 30.0.50; tree-sitter: treesit-node-field-name-for-child seems to be broken after recent changes X-Debbugs-Cc: Date: Sat, 23 Dec 2023 17:37:54 +0300 Message-ID: <874jg90yt9.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.154.239.83; envelope-from=dvzubarev@yandex.ru; helo=forward100a.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) libtree-sitter is compiled from sources (latest version) Steps to reproduce: 1. emacs -Q 2. M-x find-file /tmp/t.py 3. Paste there if (v is not None and #comment v > 0): pass 4. M-x python-ts-mode 5. M-x treesit-explore-mode python Parse tree: (module (if_statement if (parenthesized_expression ( (boolean_operator left: (comparison_operator (identifier) operators: is not operators: is not operators: (none)) operator: and operator: (comment) operator: (comparison_operator (identifier) operators: > operators: (integer))) )) condition: : condition: (block (pass_statement pass)))) Parse tree from the playground: module [0, 0] - [4, 0] if_statement [0, 0] - [2, 7] condition: parenthesized_expression [0, 3] - [1, 10] boolean_operator [0, 4] - [1, 9] left: comparison_operator [0, 4] - [0, 17] identifier [0, 4] - [0, 5] none [0, 13] - [0, 17] comment [0, 22] - [0, 30] right: comparison_operator [1, 4] - [1, 9] identifier [1, 4] - [1, 5] integer [1, 8] - [1, 9] consequence: block [2, 3] - [2, 7] pass_statement [2, 3] - [2, 7] Version from the playground has correctly assigned fields: parenthesized_expression - condition:, block is labeled as consequence:, the second comparison_operator - right: I noticed this regression after 9874561f39e62c1c9fada6c2e013f93d9ea65729. Quote from this commit "So turns out ts_node_field_name_for_child takes a named node index," It seems that was a bug in the libtree-sitter and they fixed it in https://github.com/tree-sitter/tree-sitter/pull/2104 Unfortunately, there is no release with this fix yet. I have tested various combinations of libtree-sitter and fix from 9874561f39: With commit 9874561f39 libtree-sitter v0.20.8 - condition: and consequence: fields are wrongly assigned libtree-sitter version with the fix* - most fields are broken When reverting commit 9874561f39 libtree-sitter v0.20.8 - only right: field is wrong (points to the comment node) libtree-sitter version with the fix* - ok * tree-sitter version with the fix: git clone https://github.com/tree-sitter/tree-sitter.git git checkout 6d1904c221d15d2fcbe0b590ff0a3f96c692429f It is needed to recompile grammar after changing the libtree-sitter version. In GNU Emacs 30.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-12-23 built on NUC-here Repository revision: 9c86dd52475e0ad65359bc964fbe0d62b9d3e464 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Ubuntu 22.04.3 LTS Configured using: 'configure --with-modules --with-native-compilation=aot --with-imagemagick --with-json --with-tree-sitter --with-xft' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: ru_RU.UTF-8 value of $LC_NUMERIC: ru_RU.UTF-8 value of $LC_TIME: ru_RU.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Magit Log Minor modes in effect: hide-mode-line-mode: t global-anzu-mode: t anzu-mode: t winum-mode: t dap-tooltip-mode: t dap-ui-many-windows-mode: t dap-ui-mode: t treemacs-filewatch-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t dap-auto-configure-mode: t dap-mode: t yas-global-mode: t yas-minor-mode: t recentf-mode: t save-place-mode: t global-so-long-mode: t global-git-commit-mode: t projectile-mode: t which-key-mode: t savehist-mode: t better-jumper-mode: t global-company-mode: t company-mode: t vertico-mode: t marginalia-mode: t evil-goggles-mode: t evil-escape-mode: t evil-snipe-override-mode: t evil-snipe-mode: t pcre-mode: t server-mode: t gcmh-mode: t global-hl-line-mode: t hl-line-mode: t winner-mode: t smartparens-global-mode: t ws-butler-global-mode: t undo-fu-session-global-mode: t undo-fu-mode: t global-flycheck-mode: t persp-mode: t doom-modeline-mode: t solaire-global-mode: t solaire-mode: t hexl-follow-ascii: t global-evil-surround-mode: t evil-surround-mode: t dtrt-indent-mode: t dirvish-override-dired-mode: t direnv-mode: t +lsp-optimization-mode: t evil-mode: t evil-local-mode: t +popup-mode: t override-global-mode: t general-override-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t window-divider-mode: t minibuffer-regexp-mode: t buffer-read-only: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/denin/.emacs.d/.local/straight/build-30.0.50/ivy/elpa hides /home/denin/.emacs.d/.local/straight/build-30.0.50/lispy/elpa /home/denin/.emacs.d/.local/straight/build-30.0.50/transient/transient hides /usr/local/share/emacs/30.0.50/lisp/transient /home/denin/.emacs.d/.local/straight/build-30.0.50/bind-key/bind-key hides /usr/local/share/emacs/30.0.50/lisp/bind-key /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-delight hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-delight /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-lint hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-lint /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-jump hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-jump /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-diminish hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-diminish /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-ensure hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-ensure /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-bind-key hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-bind-key /home/denin/.emacs.d/.local/straight/build-30.0.50/use-package/use-package-core hides /usr/local/share/emacs/30.0.50/lisp/use-package/use-package-core /home/denin/.emacs.d/.local/straight/build-30.0.50/project/project hides /usr/local/share/emacs/30.0.50/lisp/progmodes/project /home/denin/.emacs.d/.local/straight/build-30.0.50/gdb-mi/gdb-mi hides /usr/local/share/emacs/30.0.50/lisp/progmodes/gdb-mi /home/denin/.emacs.d/.local/straight/build-30.0.50/xref/xref hides /usr/local/share/emacs/30.0.50/lisp/progmodes/xref /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-ref hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ref /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-irc hides /usr/local/share/emacs/30.0.50/lisp/org/ol-irc /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-crypt hides /usr/local/share/emacs/30.0.50/lisp/org/org-crypt /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-attach hides /usr/local/share/emacs/30.0.50/lisp/org/org-attach /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-mouse hides /usr/local/share/emacs/30.0.50/lisp/org/org-mouse /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-latex hides /usr/local/share/emacs/30.0.50/lisp/org/ob-latex /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-eww hides /usr/local/share/emacs/30.0.50/lisp/org/ol-eww /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-ditaa hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ditaa /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-groovy hides /usr/local/share/emacs/30.0.50/lisp/org/ob-groovy /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-compat hides /usr/local/share/emacs/30.0.50/lisp/org/org-compat /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-info hides /usr/local/share/emacs/30.0.50/lisp/org/ol-info /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-protocol hides /usr/local/share/emacs/30.0.50/lisp/org/org-protocol /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-footnote hides /usr/local/share/emacs/30.0.50/lisp/org/org-footnote /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-id hides /usr/local/share/emacs/30.0.50/lisp/org/org-id /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc-biblatex hides /usr/local/share/emacs/30.0.50/lisp/org/oc-biblatex /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-C hides /usr/local/share/emacs/30.0.50/lisp/org/ob-C /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-colview hides /usr/local/share/emacs/30.0.50/lisp/org/org-colview /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-calc hides /usr/local/share/emacs/30.0.50/lisp/org/ob-calc /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-octave hides /usr/local/share/emacs/30.0.50/lisp/org/ob-octave /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-java hides /usr/local/share/emacs/30.0.50/lisp/org/ob-java /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-js hides /usr/local/share/emacs/30.0.50/lisp/org/ob-js /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-R hides /usr/local/share/emacs/30.0.50/lisp/org/ob-R /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-ruby hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ruby /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-css hides /usr/local/share/emacs/30.0.50/lisp/org/ob-css /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-odt hides /usr/local/share/emacs/30.0.50/lisp/org/ox-odt /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-man hides /usr/local/share/emacs/30.0.50/lisp/org/ol-man /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-perl hides /usr/local/share/emacs/30.0.50/lisp/org/ob-perl /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-org hides /usr/local/share/emacs/30.0.50/lisp/org/ox-org /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-html hides /usr/local/share/emacs/30.0.50/lisp/org/ox-html /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-gnuplot hides /usr/local/share/emacs/30.0.50/lisp/org/ob-gnuplot /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-entities hides /usr/local/share/emacs/30.0.50/lisp/org/org-entities /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-bibtex hides /usr/local/share/emacs/30.0.50/lisp/org/ol-bibtex /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-goto hides /usr/local/share/emacs/30.0.50/lisp/org/org-goto /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob hides /usr/local/share/emacs/30.0.50/lisp/org/ob /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-inlinetask hides /usr/local/share/emacs/30.0.50/lisp/org/org-inlinetask /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-comint hides /usr/local/share/emacs/30.0.50/lisp/org/ob-comint /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-gnus hides /usr/local/share/emacs/30.0.50/lisp/org/ol-gnus /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-latex hides /usr/local/share/emacs/30.0.50/lisp/org/ox-latex /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-version hides /usr/local/share/emacs/30.0.50/lisp/org/org-version /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-agenda hides /usr/local/share/emacs/30.0.50/lisp/org/org-agenda /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-lisp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lisp /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-matlab hides /usr/local/share/emacs/30.0.50/lisp/org/ob-matlab /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org hides /usr/local/share/emacs/30.0.50/lisp/org/org /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-maxima hides /usr/local/share/emacs/30.0.50/lisp/org/ob-maxima /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-lua hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lua /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-refile hides /usr/local/share/emacs/30.0.50/lisp/org/org-refile /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-faces hides /usr/local/share/emacs/30.0.50/lisp/org/org-faces /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-python hides /usr/local/share/emacs/30.0.50/lisp/org/ob-python /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-loaddefs hides /usr/local/share/emacs/30.0.50/lisp/org/org-loaddefs /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-lint hides /usr/local/share/emacs/30.0.50/lisp/org/org-lint /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-docview hides /usr/local/share/emacs/30.0.50/lisp/org/ol-docview /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-md hides /usr/local/share/emacs/30.0.50/lisp/org/ox-md /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-man hides /usr/local/share/emacs/30.0.50/lisp/org/ox-man /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-indent hides /usr/local/share/emacs/30.0.50/lisp/org/org-indent /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-mobile hides /usr/local/share/emacs/30.0.50/lisp/org/org-mobile /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-scheme hides /usr/local/share/emacs/30.0.50/lisp/org/ob-scheme /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox hides /usr/local/share/emacs/30.0.50/lisp/org/ox /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-tangle hides /usr/local/share/emacs/30.0.50/lisp/org/ob-tangle /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc-csl hides /usr/local/share/emacs/30.0.50/lisp/org/oc-csl /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-shell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-shell /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-beamer hides /usr/local/share/emacs/30.0.50/lisp/org/ox-beamer /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc-natbib hides /usr/local/share/emacs/30.0.50/lisp/org/oc-natbib /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-habit hides /usr/local/share/emacs/30.0.50/lisp/org/org-habit /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-emacs-lisp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-emacs-lisp /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-persist hides /usr/local/share/emacs/30.0.50/lisp/org/org-persist /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-core hides /usr/local/share/emacs/30.0.50/lisp/org/ob-core /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-icalendar hides /usr/local/share/emacs/30.0.50/lisp/org/ox-icalendar /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-haskell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-haskell /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-attach-git hides /usr/local/share/emacs/30.0.50/lisp/org/org-attach-git /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc hides /usr/local/share/emacs/30.0.50/lisp/org/oc /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-sed hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sed /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-pcomplete hides /usr/local/share/emacs/30.0.50/lisp/org/org-pcomplete /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-koma-letter hides /usr/local/share/emacs/30.0.50/lisp/org/ox-koma-letter /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-list hides /usr/local/share/emacs/30.0.50/lisp/org/org-list /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-ctags hides /usr/local/share/emacs/30.0.50/lisp/org/org-ctags /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-dot hides /usr/local/share/emacs/30.0.50/lisp/org/ob-dot /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-rmail hides /usr/local/share/emacs/30.0.50/lisp/org/ol-rmail /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-forth hides /usr/local/share/emacs/30.0.50/lisp/org/ob-forth /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-sqlite hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sqlite /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-cycle hides /usr/local/share/emacs/30.0.50/lisp/org/org-cycle /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-num hides /usr/local/share/emacs/30.0.50/lisp/org/org-num /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-src hides /usr/local/share/emacs/30.0.50/lisp/org/org-src /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-sql hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sql /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-plot hides /usr/local/share/emacs/30.0.50/lisp/org/org-plot /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-clock hides /usr/local/share/emacs/30.0.50/lisp/org/org-clock /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-element hides /usr/local/share/emacs/30.0.50/lisp/org/org-element /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-ascii hides /usr/local/share/emacs/30.0.50/lisp/org/ox-ascii /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-mhe hides /usr/local/share/emacs/30.0.50/lisp/org/ol-mhe /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-table hides /usr/local/share/emacs/30.0.50/lisp/org/ob-table /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-plantuml hides /usr/local/share/emacs/30.0.50/lisp/org/ob-plantuml /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-texinfo hides /usr/local/share/emacs/30.0.50/lisp/org/ox-texinfo /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-ocaml hides /usr/local/share/emacs/30.0.50/lisp/org/ob-ocaml /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-datetree hides /usr/local/share/emacs/30.0.50/lisp/org/org-datetree /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-doi hides /usr/local/share/emacs/30.0.50/lisp/org/ol-doi /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-macs hides /usr/local/share/emacs/30.0.50/lisp/org/org-macs /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-macro hides /usr/local/share/emacs/30.0.50/lisp/org/org-macro /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc-basic hides /usr/local/share/emacs/30.0.50/lisp/org/oc-basic /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-fold hides /usr/local/share/emacs/30.0.50/lisp/org/org-fold /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-exp hides /usr/local/share/emacs/30.0.50/lisp/org/ob-exp /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-capture hides /usr/local/share/emacs/30.0.50/lisp/org/org-capture /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-fortran hides /usr/local/share/emacs/30.0.50/lisp/org/ob-fortran /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-lob hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lob /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-awk hides /usr/local/share/emacs/30.0.50/lisp/org/ob-awk /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol hides /usr/local/share/emacs/30.0.50/lisp/org/ol /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-w3m hides /usr/local/share/emacs/30.0.50/lisp/org/ol-w3m /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-makefile hides /usr/local/share/emacs/30.0.50/lisp/org/ob-makefile /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-lilypond hides /usr/local/share/emacs/30.0.50/lisp/org/ob-lilypond /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-archive hides /usr/local/share/emacs/30.0.50/lisp/org/org-archive /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-processing hides /usr/local/share/emacs/30.0.50/lisp/org/ob-processing /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-eshell hides /usr/local/share/emacs/30.0.50/lisp/org/ob-eshell /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-julia hides /usr/local/share/emacs/30.0.50/lisp/org/ob-julia /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-sass hides /usr/local/share/emacs/30.0.50/lisp/org/ob-sass /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-screen hides /usr/local/share/emacs/30.0.50/lisp/org/ob-screen /home/denin/.emacs.d/.local/straight/build-30.0.50/org/oc-bibtex hides /usr/local/share/emacs/30.0.50/lisp/org/oc-bibtex /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-duration hides /usr/local/share/emacs/30.0.50/lisp/org/org-duration /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-org hides /usr/local/share/emacs/30.0.50/lisp/org/ob-org /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-tempo hides /usr/local/share/emacs/30.0.50/lisp/org/org-tempo /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-bbdb hides /usr/local/share/emacs/30.0.50/lisp/org/ol-bbdb /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-fold-core hides /usr/local/share/emacs/30.0.50/lisp/org/org-fold-core /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-clojure hides /usr/local/share/emacs/30.0.50/lisp/org/ob-clojure /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-timer hides /usr/local/share/emacs/30.0.50/lisp/org/org-timer /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-keys hides /usr/local/share/emacs/30.0.50/lisp/org/org-keys /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ob-eval hides /usr/local/share/emacs/30.0.50/lisp/org/ob-eval /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-table hides /usr/local/share/emacs/30.0.50/lisp/org/org-table /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ol-eshell hides /usr/local/share/emacs/30.0.50/lisp/org/ol-eshell /home/denin/.emacs.d/.local/straight/build-30.0.50/org/ox-publish hides /usr/local/share/emacs/30.0.50/lisp/org/ox-publish /home/denin/.emacs.d/.local/straight/build-30.0.50/org/org-feed hides /usr/local/share/emacs/30.0.50/lisp/org/org-feed /home/denin/.emacs.d/.local/straight/build-30.0.50/soap-client/soap-inspect hides /usr/local/share/emacs/30.0.50/lisp/net/soap-inspect /home/denin/.emacs.d/.local/straight/build-30.0.50/soap-client/soap-client hides /usr/local/share/emacs/30.0.50/lisp/net/soap-client /home/denin/.emacs.d/.local/straight/build-30.0.50/eldoc/eldoc hides /usr/local/share/emacs/30.0.50/lisp/emacs-lisp/eldoc /home/denin/.emacs.d/.local/straight/build-30.0.50/map/map hides /usr/local/share/emacs/30.0.50/lisp/emacs-lisp/map Features: (shadow sort jinx mail-extr emacsbug hide-mode-line evil-collection-magit-todos magit-todos async code-review code-review-actions code-review-comment code-review-section code-review-bitbucket code-review-faces emojify evil-collection-apropos apropos code-review-gitlab code-review-utils evil-collection-forge forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github forge-notify forge-revnote forge-pullreq forge-issue forge-topic forge-post forge-repo forge forge-core forge-db code-review-parse-hunk code-review-github code-review-db uuidgen calc-misc calc-ext calc calc-loaddefs calc-macs a code-review-interfaces deferred ghub-graphql treepy gsexp ghub closql emacsql-sqlite emacsql-sqlite-common emacsql emacsql-compiler treemacs-magit magit-bookmark magit-autoloads evil-collection-magit magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos git-gutter-fringe fringe-helper git-gutter vc bug-reference macrostep-c cmacexp evil-collection-macrostep macrostep rainbow-delimiters gnus-async gnus-ml nndoc gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-dup gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win evil-collection-gnus gnus nnheader range evil-collection-tabulated-list mm-archive url-cache debbugs-gnu debbugs-compat evil-collection-debbugs debbugs soap-client rng-xsd rng-dt rng-util xsd-regexp org-capture org-agenda the-org-mode-expansions evil-collection-org smartparens-org org-yt org-element org-persist org-id org-refile org-element-ast avl-tree org ob-emacs-lisp org-table org-loaddefs ob ob-tangle ol ob-ref ob-lob ob-table ob-exp org-macro org-src evil-collection-sh-script sh-script smie executable ob-comint org-pcomplete org-list org-footnote org-entities evil-collection-calendar cal-menu calendar cal-loaddefs evil-anzu anzu magit-apply magit-wip magit-log which-func magit-diff smerge-mode diff magit-core magit-autorevert magit-margin magit-transient magit-process magit-mode winum mule-util lsp-diagnostics lsp-headerline lsp-icons lsp-modeline lsp-ui lsp-ui-flycheck lsp-ui-doc evil-collection-lsp-ui-imenu lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-ui-util lsp-zig lsp-tilt lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-ruby-lsp lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet lsp-solargraph lsp-semgrep lsp-rust lsp-rubocop lsp-rf lsp-ruff-lsp lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-move lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy lsp-hack lsp-graphql lsp-glsl lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp gnutls lsp-crystal lsp-credo lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-astro lsp-awk lsp-ansible lsp-angular lsp-ada lsp-actionscript evil-collection-vc-git vc-git vc-dispatcher jka-compr auto-minor-mode evil-ts-obj evil-ts-obj-yaml evil-ts-obj-nix evil-ts-obj-cpp evil-ts-obj-bash evil-ts-obj-python evil-ts-obj-avy evil-ts-obj-core evil-ts-obj-util evil-ts-obj-conf cus-start outli org-faces org-keys oc lsp-pyright dap-gdb-lldb dap-utils dap-lldb ccls ccls-member-hierarchy ccls-inheritance-hierarchy ccls-call-hierarchy ccls-tree ccls-code-lens ccls-semantic-highlight ccls-common smartparens-c cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs dap-mouse dap-ui lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs-persp treemacs-projectile treemacs-evil treemacs-nerd-icons treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-tags treemacs-interface treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-faces treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture treemacs-logging treemacs-customization treemacs-macros gdb-mi gdb-module hydra bui bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils lsp-lens dap-python dap-mode dap-tasks dap-launch lsp-docker yaml posframe dap-overlays lsp-mode lsp-protocol doom-snippets doom-snippets-lib yasnippet flycheck-popup-tip evil-collection-popup popup evil-collection-elisp-mode elisp-mode evil-collection-xref xref spinner network-stream smartparens-markdown evil-collection-markdown-mode markdown-mode edit-indirect noutline outline lv inline ewoc vi-tilde-fringe display-line-numbers hl-todo smartparens-python python-el-fgallina-expansions pyvenv evil-collection-python python recentf tree-widget saveplace evil-collection-so-long so-long git-commit magit-git magit-base evil-collection-magit-section magit-section crm with-editor evil-collection-log-edit log-edit message sendmail yank-media rfc822 mml mml-sec evil-collection-epa epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log cursor-sensor delsel evil-collection-minibuffer vertico-repeat tramp-sh jupyter-tramp tramp-cache time-stamp jupyter-server jupyter-server-kernel jupyter-repl jupyter-widget-client simple-httpd jupyter-client jupyter-kernel jupyter-kernelspec jupyter-env jupyter-monads thunk jupyter-messages hmac-def jupyter-mime shr pixel-fill kinsoku url-file svg xml jupyter-rest-api url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny websocket bindat jupyter-base eieio-base tramp trampver tramp-integration tramp-message tramp-compat xdg parse-time iso8601 time-date tramp-loaddefs projectile project evil-collection-grep grep ibuffer-vc ibuf-ext evil-collection-ibuffer ibuffer ibuffer-loaddefs evil-collection-which-key which-key savehist better-jumper company-capf company-fuzzy ht ffap company evil-collection-vertico vertico orderless marginalia evil-goggles evil-easymotion evil-escape evil-snipe pcre2el rxt re-builder quail ace-window avy evil-nerd-commenter evil-nerd-commenter-operator evil-nerd-commenter-sdk smartparens-html html-mode-expansions sgml-mode facemenu dom consult-flycheck evil-collection-consult consult evil-collection-bookmark bookmark server pulse color autorevert filenotify gcmh hl-line winner smartparens-config smartparens-text smartparens loadhist ws-butler undo-fu-session undo-fu flycheck-package package-lint evil-collection-imenu imenu evil-collection-finder finder finder-inf lisp-mnt evil-collection-package-menu doom-packages package browse-url url-handlers evil-collection-flycheck flycheck persp-mode doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path f f-shortdoc shortdoc nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon doom-themes-ext-org solaire-mode face-remap spacemacs-light-theme spacemacs-theme chatgpt-shell shell-maker evil-collection-view view shell goto-addr highlight-numbers parent-mode ielm find-func evil-collection-eshell em-prompt eshell esh-mode esh-var esh-cmd generator esh-ext esh-opt esh-proc esh-io esh-arg pcomplete esh-module esh-groups esh-util files-x nhexl-mode disp-table hexl ascii-table evil-embrace embrace expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom evil-surround let-alist ob-core org-cycle org-fold org-fold-core org-compat ob-eval org-version org-macs turbo-log s evil-textobj-tree-sitter evil-textobj-tree-sitter-thing-at-point evil-textobj-tree-sitter-core treesit-langs treesit-faces treesit-langs-build dtrt-indent evil-collection-tar-mode tar-mode evil-collection-arc-mode arc-mode archive-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source password-cache url-vars mailcap treesit delight tree-sitter tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get evil-collection-compile compile text-property-search evil-collection-comint comint ansi-osc ansi-color dired-aux dired-rainbow dired-hacks-utils dirvish transient format-spec eieio eieio-core compat evil-collection-dired dired dired-loaddefs tsc-obsolete direnv json map evil-collection-diff-mode evil-collection-custom cus-edit cus-load wid-edit evil-collection annalist diff-mode dash use-package-delight ibuf-macs targets evil evil-integration evil-maps evil-commands reveal evil-jumps evil-command-window evil-types evil-search evil-macros evil-repeat evil-states evil-core advice evil-common thingatpt rect evil-vars ring derived edmacro kmacro byte-opt use-package-bind-key bind-key comp comp-cstr warnings icons comp-run comp-common rx doom-editor doom-projects doom-ui easy-mmode doom-keybinds pp cl-extra help-mode use-package-core bytecomp byte-compile general tex-site doom-start doom-modules cl-seq doom doom-lib cl-macs cl-loaddefs cl-lib pcase gv harfbuzz jansson dynamic-modules subr-x rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 1398587 358930) (symbols 48 104868 50) (strings 32 334857 37267) (string-bytes 1 11203917) (vectors 16 173893) (vector-slots 8 3342825 214963) (floats 8 1808 2246) (intervals 56 8608 1306) (buffers 992 33)) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 28 04:08:32 2023 Received: (at 67990) by debbugs.gnu.org; 28 Dec 2023 09:08:32 +0000 Received: from localhost ([127.0.0.1]:38436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rImNU-000867-1z for submit@debbugs.gnu.org; Thu, 28 Dec 2023 04:08:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rImNS-00085v-24 for 67990@debbugs.gnu.org; Thu, 28 Dec 2023 04:08:30 -0500 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 1rImNN-0003i0-9S; Thu, 28 Dec 2023 04:08:25 -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=XZqHCOlez64vM/25ySLbisVKLQA5b4OPaacl2je6Jqo=; b=r6dwLSfD+J2o w3+U6DBtA725liZUoLrXCI6TfgKHN2tNnf9jlbz7V57+GcK1m/OqqsSk2tYwEKm0LL20cILnHRx4A jZgyE+URXr2dneBFm9v+2Eypatwx1vBj2twvdVanXnOo/EMxVmSM9R+TkarKU0FMYf7wJtvB6sBx3 v5HmWqYFX2YXTLcNgf9hRY3uyrT8OdnpO9Cz9vxEsaAgs7T6x5uVszw42kFG7lbMbhphCga6JmjrS Csd4JNoypQknj/VhSwl40ZHtwvLcnDNIzp5wmBzmei0MeIpy2kxwUU1RLah5aSgJkDnIGPNL/lsG7 ygQFgfTEoMe5OR1awxSgEg==; Date: Thu, 28 Dec 2023 11:08:11 +0200 Message-Id: <83zfxu7kzo.fsf@gnu.org> From: Eli Zaretskii To: Denis Zubarev , Yuan Fu In-Reply-To: <874jg90yt9.fsf@yandex.ru> (message from Denis Zubarev on Sat, 23 Dec 2023 17:37:54 +0300) Subject: Re: bug#67990: 30.0.50; tree-sitter: treesit-node-field-name-for-child seems to be broken after recent changes References: <874jg90yt9.fsf@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67990 Cc: 67990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Denis Zubarev > Date: Sat, 23 Dec 2023 17:37:54 +0300 > > > libtree-sitter is compiled from sources (latest version) > > Steps to reproduce: > 1. emacs -Q > 2. M-x find-file /tmp/t.py > 3. Paste there > if (v is not None and #comment > v > 0): > pass > 4. M-x python-ts-mode > 5. M-x treesit-explore-mode > python > > Parse tree: > (module > (if_statement if > (parenthesized_expression ( > (boolean_operator > left: (comparison_operator (identifier) operators: is not operators: is not operators: (none)) > operator: and operator: (comment) > operator: (comparison_operator (identifier) operators: > operators: (integer))) > )) > condition: : > condition: > (block > (pass_statement pass)))) > > > Parse tree from the playground: > module [0, 0] - [4, 0] > if_statement [0, 0] - [2, 7] > condition: parenthesized_expression [0, 3] - [1, 10] > boolean_operator [0, 4] - [1, 9] > left: comparison_operator [0, 4] - [0, 17] > identifier [0, 4] - [0, 5] > none [0, 13] - [0, 17] > comment [0, 22] - [0, 30] > right: comparison_operator [1, 4] - [1, 9] > identifier [1, 4] - [1, 5] > integer [1, 8] - [1, 9] > consequence: block [2, 3] - [2, 7] > pass_statement [2, 3] - [2, 7] > > > Version from the playground has correctly assigned fields: > parenthesized_expression - condition:, block is labeled as > consequence:, the second comparison_operator - right: > > I noticed this regression after 9874561f39e62c1c9fada6c2e013f93d9ea65729. > Quote from this commit "So turns out ts_node_field_name_for_child takes a named node index," > It seems that was a bug in the libtree-sitter and they fixed it in > https://github.com/tree-sitter/tree-sitter/pull/2104 > Unfortunately, there is no release with this fix yet. > > I have tested various combinations of libtree-sitter and fix from 9874561f39: > With commit 9874561f39 > libtree-sitter v0.20.8 - condition: and consequence: fields are wrongly assigned > libtree-sitter version with the fix* - most fields are broken > > When reverting commit 9874561f39 > libtree-sitter v0.20.8 - only right: field is wrong (points to the comment node) > libtree-sitter version with the fix* - ok Yuan, any comments? From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 29 22:54:48 2023 Received: (at 67990) by debbugs.gnu.org; 30 Dec 2023 03:54:48 +0000 Received: from localhost ([127.0.0.1]:42780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJQQy-0000HB-1Q for submit@debbugs.gnu.org; Fri, 29 Dec 2023 22:54:48 -0500 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]:50667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJQQv-0000Gy-RS for 67990@debbugs.gnu.org; Fri, 29 Dec 2023 22:54:46 -0500 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3bb53e20a43so6144883b6e.1 for <67990@debbugs.gnu.org>; Fri, 29 Dec 2023 19:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703908480; x=1704513280; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g1K8n2JlIkBzZVDF6g6onZrmT0WkWLuGPOxMLd02ANI=; b=hS0gfR1WhGlXUb3fW4ZmYJTWGV5PxdcELkaA9cNX9515t3YM2Sl51GFR3XiOW2ir3L mnnTIPE2q3VNqVEls4JX0Alb8tEuCFiWHtUsg5gnasVGn8TrV2NuVrzO/Fegc3QgFJGm triZvk8WsMH88/lMXyHXbw9YHliJHdtEdkfVb1GXjuIb31Rb38X6xF3q5BywJDSYNDEu Xa9jERj2T7XdCL+hU8TaIPEiefRM6b0BqQQ+lS03JwbNcCMSaJ1qr08EcKQIbrV0j3+3 qAEBIc8AmGncWC1BuX5zR6FTRtZA6cxbbQxJjXXyo4fjh6cOhp55PG85UPZsofpmiLx6 VtCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703908480; x=1704513280; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g1K8n2JlIkBzZVDF6g6onZrmT0WkWLuGPOxMLd02ANI=; b=Ae6JrGeGWmyi1B6Lrvr6aSvzJ9IVBK9HXQNwKymy7JosN1xMrWa99tGwR9Mx+kOP9N m4lToLfzvogsPzsL6m3DfFDwC14834Ov/xDHe8g25JLb1r84s29Q1KCzVjT2JGUmhrBQ 8W1r8g6xpcWRvsL4u8ulT46JQSDtABnQ0b1iyxbYDaSiAYFuqtXNG68QCHfcaBIefxv/ kjYUtFLDrFDdGNmsPbZgoGFwU4ond3PBiA7EzUfgkhwzj1FX7ehpWMtFYVfgqGBWNHcE G4J2l+aeiH1P0RZoZk2UztATug06RVrVSrballwLWVVcEtjQ2F8ETFlcpgNA25b6Rg4i kLCQ== X-Gm-Message-State: AOJu0YzZZ6HjKQ5M/NwsdrPeHoYZy4GGcv5szAGDLA7dIz70CU0Vppuv aKjOxyfpSs2zga9rMfItUtM= X-Google-Smtp-Source: AGHT+IE3BX/Ez4PHwYTU0QS+bcEA6DQera3Xj+Opburv7dURu0mtTeziCx64i2g25GFKujHZHwf9Cw== X-Received: by 2002:a05:6808:1a20:b0:3bb:f1ed:c8ce with SMTP id bk32-20020a0568081a2000b003bbf1edc8cemr646552oib.12.1703908479644; Fri, 29 Dec 2023 19:54:39 -0800 (PST) Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id x7-20020aa793a7000000b006d9aaee2f57sm11475302pff.102.2023.12.29.19.54.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Dec 2023 19:54:39 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#67990: 30.0.50; tree-sitter: treesit-node-field-name-for-child seems to be broken after recent changes From: Yuan Fu In-Reply-To: <874jg90yt9.fsf@yandex.ru> Date: Fri, 29 Dec 2023 19:54:27 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <3BA064EC-36D3-4C9E-AA23-70034DE9A0CA@gmail.com> References: <874jg90yt9.fsf@yandex.ru> To: Denis Zubarev X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67990 Cc: 67990@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Dec 23, 2023, at 6:37 AM, Denis Zubarev = wrote: >=20 >=20 > libtree-sitter is compiled from sources (latest version)=20 >=20 > Steps to reproduce: > 1. emacs -Q > 2. M-x find-file /tmp/t.py > 3. Paste there > if (v is not None and #comment > v > 0): > pass > 4. M-x python-ts-mode > 5. M-x treesit-explore-mode > python >=20 > Parse tree: > (module > (if_statement if > (parenthesized_expression ( > (boolean_operator > left: (comparison_operator (identifier) operators: is not = operators: is not operators: (none)) > operator: and operator: (comment) > operator: (comparison_operator (identifier) operators: > operators: = (integer))) > )) > condition: : > condition: > (block > (pass_statement pass)))) >=20 >=20 > Parse tree from the playground: > module [0, 0] - [4, 0] > if_statement [0, 0] - [2, 7] > condition: parenthesized_expression [0, 3] - [1, 10] > boolean_operator [0, 4] - [1, 9] > left: comparison_operator [0, 4] - [0, 17] > identifier [0, 4] - [0, 5] > none [0, 13] - [0, 17] > comment [0, 22] - [0, 30] > right: comparison_operator [1, 4] - [1, 9] > identifier [1, 4] - [1, 5] > integer [1, 8] - [1, 9] > consequence: block [2, 3] - [2, 7] > pass_statement [2, 3] - [2, 7] >=20 >=20 > Version from the playground has correctly assigned fields: > parenthesized_expression - condition:, block is labeled as > consequence:, the second comparison_operator - right: >=20 > I noticed this regression after = 9874561f39e62c1c9fada6c2e013f93d9ea65729. > Quote from this commit "So turns out ts_node_field_name_for_child = takes a named node index," > It seems that was a bug in the libtree-sitter and they fixed it in > https://github.com/tree-sitter/tree-sitter/pull/2104 > Unfortunately, there is no release with this fix yet. >=20 > I have tested various combinations of libtree-sitter and fix from = 9874561f39: > With commit 9874561f39 > libtree-sitter v0.20.8 - condition: and consequence: fields are = wrongly assigned > libtree-sitter version with the fix* - most fields are broken >=20 > When reverting commit 9874561f39 > libtree-sitter v0.20.8 - only right: field is wrong (points to the = comment node) > libtree-sitter version with the fix* - ok >=20 >=20 > * tree-sitter version with the fix: > git clone https://github.com/tree-sitter/tree-sitter.git > git checkout 6d1904c221d15d2fcbe0b590ff0a3f96c692429f > It is needed to recompile grammar after changing the libtree-sitter = version. Thank you very much! So it seems that we should revert that commit, and = point to libtree-sitter if people come to us reporting errors. I = reverted that commit on emacs-29. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 30 02:13:22 2023 Received: (at 67990-done) by debbugs.gnu.org; 30 Dec 2023 07:13:22 +0000 Received: from localhost ([127.0.0.1]:42913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJTX7-0005sR-Hc for submit@debbugs.gnu.org; Sat, 30 Dec 2023 02:13:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJTX6-0005sF-0q for 67990-done@debbugs.gnu.org; Sat, 30 Dec 2023 02:13:21 -0500 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 1rJTWs-0001Jv-9l; Sat, 30 Dec 2023 02:13:13 -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=/TaKJMSffi+krejNF0e362Ir7uKgLIpCnVbaMhxcZfY=; b=A5XYZS5dCv5O xtLQpKQtcC3dnR2/ZhW+TmYcBFcTi2GW6h+vIttJLbzbJ2KqebSgFfwvkjdybrKO+YZb7GI+Rknmw XBkkQHJ9zPyRkKLhfmoI+8oq0eBmbXMMafRVxfe4AiNMhlJbd94p3sfQKjVBcwFfMaZ5OlZtuJJZi Py1YC3nOhi5VMU63hVZ9ZkbZKC1Pi1subTzmnPFPj+gnW14HoJp2sIspJsCFKycSvrpPtfcUA11YM DQa23Y7Hwni3UP47g1w14kS6vx1SO8LmLISPdDp0gjZl9DjQp0k6lZSfnoF7KoX+gcnO33RCP7ZGR aTVm8wk0fF7elzSGITey+g==; Date: Sat, 30 Dec 2023 09:12:56 +0200 Message-Id: <83zfxs40zr.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <3BA064EC-36D3-4C9E-AA23-70034DE9A0CA@gmail.com> (message from Yuan Fu on Fri, 29 Dec 2023 19:54:27 -0800) Subject: Re: bug#67990: 30.0.50; tree-sitter: treesit-node-field-name-for-child seems to be broken after recent changes References: <874jg90yt9.fsf@yandex.ru> <3BA064EC-36D3-4C9E-AA23-70034DE9A0CA@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67990-done Cc: 67990-done@debbugs.gnu.org, dvzubarev@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 67990@debbugs.gnu.org > From: Yuan Fu > Date: Fri, 29 Dec 2023 19:54:27 -0800 > > > > > On Dec 23, 2023, at 6:37 AM, Denis Zubarev wrote: > > > > > > libtree-sitter is compiled from sources (latest version) > > > > Steps to reproduce: > > 1. emacs -Q > > 2. M-x find-file /tmp/t.py > > 3. Paste there > > if (v is not None and #comment > > v > 0): > > pass > > 4. M-x python-ts-mode > > 5. M-x treesit-explore-mode > > python > > > > Parse tree: > > (module > > (if_statement if > > (parenthesized_expression ( > > (boolean_operator > > left: (comparison_operator (identifier) operators: is not operators: is not operators: (none)) > > operator: and operator: (comment) > > operator: (comparison_operator (identifier) operators: > operators: (integer))) > > )) > > condition: : > > condition: > > (block > > (pass_statement pass)))) > > > > > > Parse tree from the playground: > > module [0, 0] - [4, 0] > > if_statement [0, 0] - [2, 7] > > condition: parenthesized_expression [0, 3] - [1, 10] > > boolean_operator [0, 4] - [1, 9] > > left: comparison_operator [0, 4] - [0, 17] > > identifier [0, 4] - [0, 5] > > none [0, 13] - [0, 17] > > comment [0, 22] - [0, 30] > > right: comparison_operator [1, 4] - [1, 9] > > identifier [1, 4] - [1, 5] > > integer [1, 8] - [1, 9] > > consequence: block [2, 3] - [2, 7] > > pass_statement [2, 3] - [2, 7] > > > > > > Version from the playground has correctly assigned fields: > > parenthesized_expression - condition:, block is labeled as > > consequence:, the second comparison_operator - right: > > > > I noticed this regression after 9874561f39e62c1c9fada6c2e013f93d9ea65729. > > Quote from this commit "So turns out ts_node_field_name_for_child takes a named node index," > > It seems that was a bug in the libtree-sitter and they fixed it in > > https://github.com/tree-sitter/tree-sitter/pull/2104 > > Unfortunately, there is no release with this fix yet. > > > > I have tested various combinations of libtree-sitter and fix from 9874561f39: > > With commit 9874561f39 > > libtree-sitter v0.20.8 - condition: and consequence: fields are wrongly assigned > > libtree-sitter version with the fix* - most fields are broken > > > > When reverting commit 9874561f39 > > libtree-sitter v0.20.8 - only right: field is wrong (points to the comment node) > > libtree-sitter version with the fix* - ok > > > > > > * tree-sitter version with the fix: > > git clone https://github.com/tree-sitter/tree-sitter.git > > git checkout 6d1904c221d15d2fcbe0b590ff0a3f96c692429f > > It is needed to recompile grammar after changing the libtree-sitter version. > > Thank you very much! So it seems that we should revert that commit, and point to libtree-sitter if people come to us reporting errors. I reverted that commit on emacs-29. Thanks, I'm therefore closing this bug. From unknown Sun Jun 22 08:06:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Jan 2024 12:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator