GNU bug report logs -
#61913
java-ts-mode query error for string highlight, due to recent commit in tree-sitter-java.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
nvim-treesiter seems to use a "lockfile" in which they put the version of
the language parser to be installed (
https://github.com/nvim-treesitter/nvim-treesitter/blob/master/lockfile.json)
to allow some stability I suppose.
Il giorno sab 4 mar 2023 alle ore 10:27 Yuan Fu <casouri <at> gmail.com> ha
scritto:
>
>
> > On Mar 3, 2023, at 11:10 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >> From: Yuan Fu <casouri <at> gmail.com>
> >> Date: Fri, 3 Mar 2023 14:32:02 -0800
> >> Cc: Eli Zaretskii <eliz <at> gnu.org>,
> >> 61913 <at> debbugs.gnu.org
> >>
> >>>>> Error during redeployment: (jit-lock-function 8295) reported
> >>>>> (treesit-query-error "Node type error at" 42 "(string_literal)
> >>>>> @font-lock-string-face (text_block) @font-lock-string-face"
> >>>>> "Debugging the query with `treesit-query-validate'")
> >>>>>
> >>>>>
> >>>>> The attached patch fixes the problem.
> >>>>
> >>>> Wouldn't removing text_block from our code cause problems if someone
> >>>> uses tree-sitter-java from before the removal?
> >>>>
> >>>> Is there a way to write code which handles text_block if it exists?
> >>>>
> >>
> >> Tree-sitter language grammars really need some versioning system. I
> >> wonder how do we propose such things to them tho...
> >
> > That'd be hard, given that many of them don't even make releases.
> >
> > It should be enough for our purposes to have a possibility of querying
> > the grammar about support for specific features. Then the version
> > will not matter, only the supported features will. Maybe we could do
> > that ourselves, on-the-fly, like we do with programs when we want to
> > know whether they support some command-line switch?
>
> We can test whether a node type exists in the grammar, by trying to
> compile a query using that node type. If it returns successfully, then the
> node type exists. But there are other assumptions we make about a grammar,
> like “the 2nd child of a if node must be the condition”. Hopefully these
> more subtle things don’t change easily, because we can’t easily test them.
>
> Yuan
>
>
[Message part 2 (text/html, inline)]
This bug report was last modified 2 years and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.