Re: pkg/60130: Add tree-sitter 0.25 package to allow building Emacs 30 with tree-sitter support
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR pkg/60130; it has been noted by GNATS. From: [email protected] To: [email protected] Cc: Subject: Re: pkg/60130: Add tree-sitter 0.25 package to allow building Emacs 30 with tree-sitter support Date: Thu, 26 Mar 2026 16:07:40 +0000 > The following reply was made to PR pkg/60130; it has been noted by GNATS. > > From: Thomas Klausner <[email protected]> > To: NetBSD bugtracking <[email protected]> > Cc: > Subject: Re: pkg/60130: Add tree-sitter 0.25 package to allow building Emacs > 30 with tree-sitter support > Date: Thu, 26 Mar 2026 08:39:12 +0100 > > On Thu, Mar 26, 2026 at 01:00:02AM +0100, [email protected] via gnats wrote: > > Are you sure you're actually building with tree-sitter enabled? Ensure > > you're passing `--with-tree-sitter` to `configure`. > > I was testing editors/emacs30 as-is, which does not set that. But the > configure output says: > > checking for tree-sitter >= 0.20.2... yes > ... > Does Emacs use -ltree-sitter? yes > > and the binary is linked against tree-sitter: > > # ldd /usr/pkg/bin/emacs | grep tree-sitter > -ltree-sitter.0.26 => /usr/pkg/lib/libtree-sitter.so.0.26 > > (that's with 0.26.7 installed) > > > The changes made in tree-sitter 0.26 had to be explicitly accounted for > > in upstream Emacs for the upcoming Emacs 31, and the commit which > > accounted for these changes was never backported to Emacs 30: > > > > https://github.com/emacs-mirror/emacs/commit/d587ce8c65a0e22ab0a63ef2873a3dfcfbeba166 > > The code in emacs 30.2 (the current pkgsrc version) includes the > ifdefs from that commit. > > Which emacs version are you testing exactly? > Which pkgsrc tree/branch are you using? > Thomas > I don't know if NetBSD is using a patched version of the source code, but the upstream source definitely doesn't have those ifdefs in the emacs-30 branch. You can see that here: https://github.com/emacs-mirror/emacs/blob/master/src/treesit.c https://github.com/emacs-mirror/emacs/blob/emacs-30/src/treesit.c For clarification, I'm building my Emacs from source, not via pkgsrc, as I have a personal build script that I use across platforms.