Package: emacs;
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 13 May 2023 06:41:02 UTC
Severity: normal
Found in version 29.0.90
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63481 in the body.
You can then email your comments to 63481 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#63481
; Package emacs
.
(Sat, 13 May 2023 06:41:02 GMT) Full text and rfc822 format available.Eli Zaretskii <eliz <at> gnu.org>
:bug-gnu-emacs <at> gnu.org
.
(Sat, 13 May 2023 06:41:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: bug-gnu-emacs <at> gnu.org Subject: 29.0.90; src/treesit-tests fail in treesit-basic-parsing Date: Sat, 13 May 2023 09:40:28 +0300
To reproduce: $ cd test $ make src/treesit-tests SELECTOR='treesit-basic-parsing' This results in: GEN src/treesit-tests.log make[1]: Entering directory `/d/gnu/git/emacs/branch/test' Running 1 tests (2023-05-13 09:36:51+0300, selector `treesit-basic-parsing') Test treesit-basic-parsing backtrace: signal(ert-test-failed (((should (equal (treesit-node-string (treesi ert-fail(((should (equal (treesit-node-string (treesit-parser-root-n (if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form (let (form-description-14) (if (unwind-protect (setq value-12 (apply (let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip (let* ((fn-10 #'equal) (args-11 (condition-case err (let ((signal-ho (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #'eq) (ar (progn (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #' (unwind-protect (progn (let ((parser (treesit-parser-create 'json))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current (closure (t) nil (let* ((fn-0 #'treesit-language-available-p) (args- ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name treesit-basic-parsing :documentation ert-run-or-rerun-test(#s(ert--stats :selector treesit-basic-parsing ert-run-tests(treesit-basic-parsing #f(compiled-function (event-type ert-run-tests-batch(treesit-basic-parsing) ert-run-tests-batch-and-exit(treesit-basic-parsing) eval((ert-run-tests-batch-and-exit 'treesit-basic-parsing) t) command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" "-- command-line() normal-top-level() Test treesit-basic-parsing condition: (ert-test-failed ((should (equal (treesit-node-string ...) "(ERROR)")) :form (equal "(document)" "(ERROR)") :value nil :explanation (arrays-of-different-length 10 7 "(document)" "(ERROR)" first-mismatch-at 1))) FAILED 1/1 treesit-basic-parsing (0.000000 sec) at src/treesit-tests.el:59 Ran 1 tests, 0 results as expected, 1 unexpected (2023-05-13 09:36:52+0300, 1.078125 sec) It looks to me that the test assumes an empty buffer should parse as an error, but the latest JSON grammar succeeds to parse it as a valid document. The rest of treesit-tests pass as expected. Can this be fixed, please? In GNU Emacs 29.0.90 (build 93, i686-pc-mingw32) of 2023-05-13 built on HOME-C4E4A596F7 Repository revision: 4bda96273490e025d1fd1a50b4bf3cab1b2def1c Repository branch: emacs-29 Windowing system distributor 'Microsoft Corp.', version 5.1.2600 System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600) Configured using: 'configure -C --prefix=/d/usr --with-wide-int --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3'' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win 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 w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 42737 8492) (symbols 48 6286 0) (strings 16 16561 1835) (string-bytes 1 399112) (vectors 16 9323) (vector-slots 8 147333 11986) (floats 8 23 33) (intervals 40 273 71) (buffers 888 10))
bug-gnu-emacs <at> gnu.org
:bug#63481
; Package emacs
.
(Thu, 18 May 2023 11:23:01 GMT) Full text and rfc822 format available.Message #8 received at 63481 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Yuan Fu <casouri <at> gmail.com> Cc: 63481 <at> debbugs.gnu.org Subject: Re: bug#63481: 29.0.90; src/treesit-tests fail in treesit-basic-parsing Date: Thu, 18 May 2023 14:23:01 +0300
Ping! > Date: Sat, 13 May 2023 09:40:28 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > To reproduce: > > $ cd test > $ make src/treesit-tests SELECTOR='treesit-basic-parsing' > > This results in: > > GEN src/treesit-tests.log > make[1]: Entering directory `/d/gnu/git/emacs/branch/test' > Running 1 tests (2023-05-13 09:36:51+0300, selector `treesit-basic-parsing') > Test treesit-basic-parsing backtrace: > signal(ert-test-failed (((should (equal (treesit-node-string (treesi > ert-fail(((should (equal (treesit-node-string (treesit-parser-root-n > (if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form > (let (form-description-14) (if (unwind-protect (setq value-12 (apply > (let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip > (let* ((fn-10 #'equal) (args-11 (condition-case err (let ((signal-ho > (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #'eq) (ar > (progn (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #' > (unwind-protect (progn (let ((parser (treesit-parser-create 'json))) > (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn > (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current > (closure (t) nil (let* ((fn-0 #'treesit-language-available-p) (args- > ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test > ert-run-test(#s(ert-test :name treesit-basic-parsing :documentation > ert-run-or-rerun-test(#s(ert--stats :selector treesit-basic-parsing > ert-run-tests(treesit-basic-parsing #f(compiled-function (event-type > ert-run-tests-batch(treesit-basic-parsing) > ert-run-tests-batch-and-exit(treesit-basic-parsing) > eval((ert-run-tests-batch-and-exit 'treesit-basic-parsing) t) > command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" "-- > command-line() > normal-top-level() > Test treesit-basic-parsing condition: > (ert-test-failed > ((should > (equal > (treesit-node-string ...) > "(ERROR)")) > :form > (equal "(document)" "(ERROR)") > :value nil :explanation > (arrays-of-different-length 10 7 "(document)" "(ERROR)" first-mismatch-at 1))) > FAILED 1/1 treesit-basic-parsing (0.000000 sec) at src/treesit-tests.el:59 > > Ran 1 tests, 0 results as expected, 1 unexpected (2023-05-13 09:36:52+0300, 1.078125 sec) > > It looks to me that the test assumes an empty buffer should parse as > an error, but the latest JSON grammar succeeds to parse it as a valid > document. > > The rest of treesit-tests pass as expected. > > Can this be fixed, please? > > > In GNU Emacs 29.0.90 (build 93, i686-pc-mingw32) of 2023-05-13 built on > HOME-C4E4A596F7 > Repository revision: 4bda96273490e025d1fd1a50b4bf3cab1b2def1c > Repository branch: emacs-29 > Windowing system distributor 'Microsoft Corp.', version 5.1.2600 > System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600) > > Configured using: > 'configure -C --prefix=/d/usr --with-wide-int > --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3'' > > Configured features: > ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY > W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB > > Important settings: > value of $LANG: ENU > locale-coding-system: cp1255 > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util text-property-search time-date subr-x mm-decode > mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader > cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util > mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric > uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 > ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win > 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 > w32notify w32 lcms2 multi-tty make-network-process emacs) > > Memory information: > ((conses 16 42737 8492) > (symbols 48 6286 0) > (strings 16 16561 1835) > (string-bytes 1 399112) > (vectors 16 9323) > (vector-slots 8 147333 11986) > (floats 8 23 33) > (intervals 40 273 71) > (buffers 888 10)) > > > >
Yuan Fu <casouri <at> gmail.com>
:Eli Zaretskii <eliz <at> gnu.org>
:Message #13 received at 63481-done <at> debbugs.gnu.org (full text, mbox):
From: Yuan Fu <casouri <at> gmail.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: 63481-done <at> debbugs.gnu.org Subject: Re: bug#63481: 29.0.90; src/treesit-tests fail in treesit-basic-parsing Date: Thu, 18 May 2023 14:46:53 -0700
> On May 18, 2023, at 4:23 AM, Eli Zaretskii <eliz <at> gnu.org> wrote: > > Ping! > >> Date: Sat, 13 May 2023 09:40:28 +0300 >> From: Eli Zaretskii <eliz <at> gnu.org> >> >> To reproduce: >> >> $ cd test >> $ make src/treesit-tests SELECTOR='treesit-basic-parsing' >> >> This results in: >> >> GEN src/treesit-tests.log >> make[1]: Entering directory `/d/gnu/git/emacs/branch/test' >> Running 1 tests (2023-05-13 09:36:51+0300, selector `treesit-basic-parsing') >> Test treesit-basic-parsing backtrace: >> signal(ert-test-failed (((should (equal (treesit-node-string (treesi >> ert-fail(((should (equal (treesit-node-string (treesit-parser-root-n >> (if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form >> (let (form-description-14) (if (unwind-protect (setq value-12 (apply >> (let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip >> (let* ((fn-10 #'equal) (args-11 (condition-case err (let ((signal-ho >> (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #'eq) (ar >> (progn (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #' >> (unwind-protect (progn (let ((parser (treesit-parser-create 'json))) >> (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn >> (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current >> (closure (t) nil (let* ((fn-0 #'treesit-language-available-p) (args- >> ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test >> ert-run-test(#s(ert-test :name treesit-basic-parsing :documentation >> ert-run-or-rerun-test(#s(ert--stats :selector treesit-basic-parsing >> ert-run-tests(treesit-basic-parsing #f(compiled-function (event-type >> ert-run-tests-batch(treesit-basic-parsing) >> ert-run-tests-batch-and-exit(treesit-basic-parsing) >> eval((ert-run-tests-batch-and-exit 'treesit-basic-parsing) t) >> command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" "-- >> command-line() >> normal-top-level() >> Test treesit-basic-parsing condition: >> (ert-test-failed >> ((should >> (equal >> (treesit-node-string ...) >> "(ERROR)")) >> :form >> (equal "(document)" "(ERROR)") >> :value nil :explanation >> (arrays-of-different-length 10 7 "(document)" "(ERROR)" first-mismatch-at 1))) >> FAILED 1/1 treesit-basic-parsing (0.000000 sec) at src/treesit-tests.el:59 >> >> Ran 1 tests, 0 results as expected, 1 unexpected (2023-05-13 09:36:52+0300, 1.078125 sec) >> >> It looks to me that the test assumes an empty buffer should parse as >> an error, but the latest JSON grammar succeeds to parse it as a valid >> document. >> >> The rest of treesit-tests pass as expected. >> >> Can this be fixed, please? I pushed the fix. This is indeed due to a change to tree-sitter-json, I linked to the commit in the message. Yuan
bug-gnu-emacs <at> gnu.org
:bug#63481
; Package emacs
.
(Fri, 19 May 2023 05:41:01 GMT) Full text and rfc822 format available.Message #16 received at 63481 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Yuan Fu <casouri <at> gmail.com> Cc: 63481 <at> debbugs.gnu.org Subject: Re: bug#63481: 29.0.90; src/treesit-tests fail in treesit-basic-parsing Date: Fri, 19 May 2023 08:40:17 +0300
> From: Yuan Fu <casouri <at> gmail.com> > Date: Thu, 18 May 2023 14:46:53 -0700 > Cc: 63481-done <at> debbugs.gnu.org > > >> It looks to me that the test assumes an empty buffer should parse as > >> an error, but the latest JSON grammar succeeds to parse it as a valid > >> document. > >> > >> The rest of treesit-tests pass as expected. > >> > >> Can this be fixed, please? > > I pushed the fix. This is indeed due to a change to tree-sitter-json, I linked to the commit in the message. Thanks, the test now passes for me.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Fri, 16 Jun 2023 11:24:13 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.