bug#81125: 30.2; 30.2; php-ts-mode font-lock fails with treesit-query-error although query validates
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Sat, 1 Aug 2026 16:31:29 +0200 > Cc: [email protected], [email protected] > From: Philipp Sutter <[email protected]> > > sorry, i was for some weeks not on my computer. > > Thank you. Your diagnosis was correct. > > My configuration installed tree-sitter-php from the master branch: > > (php "https://github.com/tree-sitter/tree-sitter-php" > "master" > "php/src") > > Since the temporary Git checkout no longer exists, I could not determine the exact commit of the previously > installed library. However, direct query tests showed: > > "callable" => treesit-query-error > "from" => treesit-query-error > "yield from" => valid > (primitive_type) => valid > > I then replaced the grammar with tree-sitter-php v0.23.11, as specified by Emacs 30.2. > > The query results are now: > > "callable" => valid > "from" => valid > "yield from" => treesit-query-error > (primitive_type) => valid > > I also repeated the original reproducer. It now completes without a treesit-query-error and prints: > > (php-ts-mode nil (php javascript css html)) > > The nil value of font-lock-mode is expected because the test runs with --batch; Emacs disables Font Lock > mode in noninteractive batch mode. > > Therefore, the problem was caused by an incompatible tree-sitter-php grammar installed from master, not by > my Emacs configuration or by php-ts-mode itself. > > Thank you for identifying the grammar-version mismatch. Thanks, I'm therefore closing this bug.