Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912716 - dev-libs/tree-sitter-bash: new version 0.20.0
Summary: dev-libs/tree-sitter-bash: new version 0.20.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Smith
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-08-21 07:36 UTC by Thomas Bracht Laumann Jespersen
Modified: 2023-08-31 04:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bracht Laumann Jespersen 2023-08-21 07:36:29 UTC
A new version appears to have been tagged for tree-sitter-bash: https://github.com/tree-sitter/tree-sitter-bash/commit/c0f5797a728fc4ebd78a8b0e436b1494a8ab5f51

There's no 0.20.0 entry on the releases page (yet): https://github.com/tree-sitter/tree-sitter-bash/releases

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-22 13:06:30 UTC
pkgcheck has a memory leak with this, so it has a < dep for now:

commit aba9bc8387665d8edaa28639d869a410b5eca437
Author: Arthur Zamarin <arthurzam@gentoo.org>
Date:   Sat Aug 19 10:03:32 2023 +0300

    dev-util/pkgcheck: limit dev-libs/tree-sitter-bash version

    The new 0.20.0 dev-libs/tree-sitter-bash version (young release,
    still not in gentoo) causes huge memory leak in pkgcheck.
    Investigation in progress, until then limit for now to not cause
    breakage.

    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Comment 2 Matthew Smith gentoo-dev 2023-08-23 21:09:56 UTC
I tried testing with Emacs bash-ts-mode and I think that it it triggers the same issue as pkgcheck, goes unresponsive and rapidly allocates memory until OOM killed.

It looks like upstream are still sorting a lot of things out after a rewrite (lots of recent commits, 0.20.1 released yesterday, 0.20.2 released today), so I think that we should wait until they calm down, test again, then look at bumping :)
Comment 3 Larry the Git Cow gentoo-dev 2023-08-27 20:26:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ad1f6c24ed9571fe16dec4620c413248e11ce0e

commit 1ad1f6c24ed9571fe16dec4620c413248e11ce0e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-26 18:08:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-27 20:26:14 +0000

    dev-libs/tree-sitter-bash: add 0.20.3
    
    Closes: https://bugs.gentoo.org/912716
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/tree-sitter-bash/Manifest                       |  1 +
 dev-libs/tree-sitter-bash/tree-sitter-bash-0.20.3.ebuild | 13 +++++++++++++
 2 files changed, 14 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0a16a3f519de9ec5ecef601788219dbba7e1a8f

commit f0a16a3f519de9ec5ecef601788219dbba7e1a8f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-26 18:02:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-27 20:26:13 +0000

    dev-libs/tree-sitter: stop installing parser.h
    
    There shouldn't be a system-wide copy of parser.h and upstream plan on
    dropping this from dev-libs/tree-sitter as it can cause issues if there's
    a mismatch between the version used for the bundled generated parser
    vs the header used to build the library.
    
    Backport that change to avoid mismatches.
    
    Bug: https://github.com/tree-sitter/tree-sitter-bash/issues/199
    Bug: https://bugs.gentoo.org/912716
    Signed-off-by: Sam James <sam@gentoo.org>

 .../tree-sitter-0.20.8-no-parser-header.patch      | 23 +++++++++
 dev-libs/tree-sitter/tree-sitter-0.20.8-r1.ebuild  | 54 ++++++++++++++++++++++
 2 files changed, 77 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21c41570673c156af3780b11cfbdf8cf42b3974d

commit 21c41570673c156af3780b11cfbdf8cf42b3974d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-26 17:52:19 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-27 20:26:13 +0000

    tree-sitter-grammar.eclass: force use of local parser.h
    
    There shouldn't be a system-wide copy of parser.h and upstream plan on
    dropping this from dev-libs/tree-sitter as it can cause issues if there's
    a mismatch between the version used for the bundled generated parser
    vs the header used to build the library.
    
    Force use of the correct one in the dist tarball at src/tree_sitter/parser.h
    instead. Drop the dependency on dev-libs/tree-sitter given we were only depending
    on it for this header.
    
    Bug: https://github.com/tree-sitter/tree-sitter-bash/issues/199
    Bug: https://bugs.gentoo.org/912716
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/tree-sitter-grammar.eclass | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2023-08-31 04:21:32 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fdc1251b7205263da7b5360aee17a5c5f82f7c5

commit 7fdc1251b7205263da7b5360aee17a5c5f82f7c5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-31 04:19:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-31 04:19:31 +0000

    dev-util/rizin: fix build w/ >=tree-sitter-0.20.8-r1
    
    >=tree-sitter-0.20.8-r1 doesn't install parser.h anymore because it may be
    mismatched with the version used to build the parser. Use one bundled with
    rizin-shell-parser instead.
    
    This should propagate into rizin-shell-parser when they regenerate
    with a newer tree-sitter release (once one is made).
    
    See also:
    * https://github.com/tree-sitter/tree-sitter/pull/2573
    * https://github.com/tree-sitter/tree-sitter/pull/2574
    
    Bug: https://bugs.gentoo.org/912716
    Closes: https://bugs.gentoo.org/913343
    Signed-off-by: Sam James <sam@gentoo.org>

 .../rizin-0.5.2-find-tree-sitter-parser.patch      | 33 ++++++++++++++++++++++
 dev-util/rizin/rizin-0.5.2.ebuild                  |  1 +
 2 files changed, 34 insertions(+)