From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jimmy Wong Newsgroups: gmane.emacs.bugs Subject: bug#63755: 29.0.91; json-ts-mode tree-sitter query error with tree-sitter 0.19 Date: Sat, 27 May 2023 18:31:24 +0100 Message-ID: References: <83zg5pit62.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="64723e71_5fa87c0_b973" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5770"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63755@debbugs.gnu.org To: Yuan Fu , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 27 19:32:17 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 1q2xm5-0001Fw-NQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 May 2023 19:32:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2xlr-0006fs-4e; Sat, 27 May 2023 13:32:03 -0400 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 1q2xlq-0006fj-8G for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 13:32:02 -0400 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 1q2xlp-0000NI-VO for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 13:32:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2xlp-0003kV-QK for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 13:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63755 X-GNU-PR-Package: emacs Original-Received: via spool by 63755-submit@debbugs.gnu.org id=B63755.168520869714363 (code B ref 63755); Sat, 27 May 2023 17:32:01 +0000 Original-Received: (at 63755) by debbugs.gnu.org; 27 May 2023 17:31:37 +0000 Original-Received: from localhost ([127.0.0.1]:52527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2xlR-0003jb-CU for submit@debbugs.gnu.org; Sat, 27 May 2023 13:31:37 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:56356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2xlP-0003jI-Gd for 63755@debbugs.gnu.org; Sat, 27 May 2023 13:31:35 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-30a1fdde3d6so1816964f8f.0 for <63755@debbugs.gnu.org>; Sat, 27 May 2023 10:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685208689; x=1687800689; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=Z1DRJLSsAXoWDymzHg7ZcvB1N6hEaTvRVo/iQloENGo=; b=SfK1KZT0nEd/xaOcp0E4SqBdd5zKa4U3sKOeQK2sZz7ClvIffJsQ03nca9vsrA0yqJ AH7D5FqUuOJbfC/KZuMv199vkoznnrOLFY88GvZstU0OIQsDAYpD+GUfR1X4ocZ1iHIX i8S3iurMMOxwZYD/5rwCWQuPhh74EV1lwInPNyTIREToCFhh5gro2SvQKxWbVGUMAszO XtnO9rS8YHv/rqzwKWZeISzMcPfqWrxQ7pfv2BFRECHV6SLV/iqSdKqJN5sHdfi7FD1r DwAgGZHyLcJFBsn06XsP/GlS+rYLN4Qxhov0pQgcc01ysk2Bc8ZbMggUHKAKrPQPdhsL pm6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685208689; x=1687800689; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z1DRJLSsAXoWDymzHg7ZcvB1N6hEaTvRVo/iQloENGo=; b=bwEQ5fezk2rddcUnqrXFgWnuLT0k+vw0H0KksxwfE8FRzXkNWLdHEr3EGs6qgqDNWK xI/ZI5z7pWK0sg83Emlg43+0o1V/5fyNVdJzHbH0FXQRoycLte58MIG2I4txQes5Jq2F zwG4RywW74BFgn7aqgQ8PAFshZrhU8s21XzicWTFs2oTi9Bi9MLCaDiOEy9sLwDytF9H 1M7eLcyrDOgabJzMtAG6d5Pvw7n88UOIKHm0kdr+m6LKqYLxBybox1+vl+z/lXeqhSao aA3NnIRaU6t7uUS5HPioXVzu96g62m0Bm5lvnvINiTjfSz/vvPTqy2G8rC3VsRHfVZts 6LZQ== X-Gm-Message-State: AC+VfDwRIEKsrkauHuByR6ODGADHWb5nXhCTC23XsoAyITkFZWUkhe/C o8RSRL24GMmVjCfGqPuIRvA= X-Google-Smtp-Source: ACHHUZ4iQJnoK6tpHGlPPwPf2EnSZYzTsvwEuDJzrp4G2w21KsbmrbZM/CsVi17h0PrvtaJj8PI2NA== X-Received: by 2002:adf:ee0d:0:b0:309:3828:2bde with SMTP id y13-20020adfee0d000000b0030938282bdemr4492525wrn.60.1685208689346; Sat, 27 May 2023 10:31:29 -0700 (PDT) Original-Received: from [2a01:4b00:89a0:2400::ffff:ffff] ([2a01:4b00:89a0:2400:2475:e966:d579:bf7f]) by smtp.gmail.com with ESMTPSA id g18-20020a7bc4d2000000b003f427687ba7sm8781100wmk.41.2023.05.27.10.31.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 May 2023 10:31:28 -0700 (PDT) In-Reply-To: <83zg5pit62.fsf@gnu.org> X-Readdle-Message-ID: d5a49f91-c218-4201-ab88-ede170ea51be@Spark 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:262484 Archived-At: --64723e71_5fa87c0_b973 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Yes, it=E2=80=99s similar as =2363086, I think it=E2=80=99s probably wort= h double checking all the *-ts-modes works with the latest released tree-= sitter version. tree-sitter-json 0.19 does not allow comments or top leve= l values. On 27 May 2023 at 6:24 PM +0100, Eli Zaretskii , wrote: > > =46rom: Jimmy Yuen Ho Wong > > Date: Sat, 27 May 2023 16:31:14 +0100 > > > > > > Reproduction: > > > > 1. echo '=7B =22hello=22 : 1 =7D' > test.json > > 2. open /path/to/ns-port-emacs-29 ./test.json --args -q > > 3. M-x json-ts-mode > > 4. Observe font-lock is not working in the buffer and the following > > message in the *Messages* buffer: > > > > =60=60=60 > > Error during redisplay: (jit-lock-function 1) signaled (treesit-query= -error =22Node type error at=22 2 =22(comment) =40font-lock-comment-face=22= =22Debug the query with =60treesit-query-validate'=22) > > =60=60=60 > > I cannot reproduce this: the font-lock works fine for me, and I see no > error messages in *Messages*. > > Maybe your JSON grammar is not the latest one or something=3F > > Yuan, could you please look into this=3F --64723e71_5fa87c0_b973 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Yes, it=E2=80=99s similar as =2363086, I think it=E2= =80=99s probably worth double checking all the *-ts-modes works with the = latest released tree-sitter version. tree-sitter-json 0.19 does not allow= comments or top level values.
On 27 May 2023 at 6:24 PM +0100, El= i Zaretskii <eliz=40gnu.org>, wrote:
=46rom: Jimmy Yuen Ho Wong <wyuenho=40gm= ail.com>
Date: Sat, 27 May 2023 16:31:14 +0100


Reproduction:

1. echo '=7B =22hello=22 : 1 =7D' > test.json
2. open /path/to/ns-port-emacs-29 ./test.json --args -q
3. M-x json-ts-mode
4. Observe font-lock is not working in the buffer and the following
= message in the *Messages* buffer:

=60=60=60
Error during redisplay: (jit-lock-function 1) signaled (treesit-query-err= or =22Node type error at=22 2 =22(comment) =40font-lock-comment-face=22 =22= Debug the query with =60treesit-query-validate'=22)
=60=60=60

I cannot reproduce this: the font-lock works fine for me, and I see no error messages in *Messages*.

Maybe your JSON grammar is not the latest one or something=3F

Yuan, could you please look into this=3F
--64723e71_5fa87c0_b973--