GNU bug report logs - #59426
29.0.50; [tree-sitter] Some functions exceed maximum recursion limit

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Mon, 21 Nov 2022 00:54:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, 59426 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefankangas <at> gmail.com>
Subject: bug#59426: 29.0.50; [tree-sitter] Some functions exceed maximum recursion limit
Date: Thu, 24 Nov 2022 11:24:19 +0100
24 nov. 2022 kl. 10.17 skrev Yuan Fu <casouri <at> gmail.com>:

> Does it worth the complexity tho? We only need a stack if we want to support this scenario, in which case tree-sitter has a wrong parse tree. Instead of spending the time and resource to go down that deep tree, it’s better to fail early, and let the user decide to either give up on weird files, or try some other approximation.
> 
> It’s too early to tell if being able to go down arbitrarily deep into a deep tree is useful. The only use of traversing the whole tree right now is to generate the imenu indexes, which don’t really need to go down more than 10 levels, since most defun nodes we are interested in are either top-level or near top-level.

You may very well be right about that.

> So I’d prefer we keep it simple and have a hard limit for now. If we later find that a stack is favorable we can always add it in.

That sounds good. Maybe the #line snag in the packet-rrc.c example should be reported upstream?





This bug report was last modified 2 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.