Skip to content

tree-sitter: add new package - #27954

Open
betonmischer86 wants to merge 1 commit into
openwrt:masterfrom
betonmischer86:master-libtree-sitter
Open

betonmischer86 wants to merge 1 commit into
openwrt:masterfrom
betonmischer86:master-libtree-sitter

Conversation

@betonmischer86

@betonmischer86 betonmischer86 commented Nov 25, 2025 •

Copy link
Copy Markdown

📦 Package Details

Maintainer: @betonmischer86
(You can find this by checking the history of the package Makefile.)

Description:
Tree-sitter is an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited.

This is a package for the tree-sitter library separate from the tree-sitter CLI tool.


🧪 Run Testing Details

  • OpenWrt Version: OpenWrt SNAPSHOT r31813
  • OpenWrt Target/Subtarget: mediatek/filogic
  • OpenWrt Device: Banana Pi BPI-R4 (2x SFP+)

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@GeorgeSapkin GeorgeSapkin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this and #27953 are built from the same source, can they be subpackages of the same package? And what is going to use this library? Check sqlite3 package for an example of library and CLI in the same package.

Comment thread libs/tree-sitter/LICENSE Outdated
Comment thread libs/tree-sitter/Makefile Outdated
@betonmischer86

Copy link
Copy Markdown
Author

Since this and #27953 are built from the same source, can they be subpackages of the same package? And what is going to use this library? Check sqlite3 package for an example of library and CLI in the same package.

That's what I tried to do first, but failed due to the different language toolchains of the library and CLI tool. The tool won't build unless rust-package.mk is included and the library won't build if it is. I couldn't find any existing packages to use as a guide to resolve this. Any tips would be much appreciated.

@BKPepe
BKPepe force-pushed the master-libtree-sitter branch from 8defb18 to a3ce12f Compare July 6, 2026 08:08

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.

The Makefile follows established in-tree conventions (the /usr/local staging paths, the libtree-sitter.so* glob in the runtime install, and the Build/InstallDev layout all match existing accepted library packages such as libs/libcli). Upstream tag v0.25.10 is confirmed to exist. No CI runs are attached to the head commit yet, so no build results to ground against.

The open design question about consolidating the library and CLI into subpackages of a single source package (and what will consume the library) has already been raised in review and is being discussed, so it is not repeated here.


Generated by Claude Code

@betonmischer86
betonmischer86 force-pushed the master-libtree-sitter branch from a3ce12f to b943c60 Compare August 7, 2026 19:02

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.

The head SHA changed only because the branch was rebased onto a newer master — libs/tree-sitter/Makefile is byte-identical to the previously reviewed revision (a3ce12f), and the commit message is unchanged. All three FormalityCheck runs on the head commit are green.

Re-checked against the packaging rules on the current revision, nothing to flag: PKG_RELEASE:=1 is correct for a new package, PKG_MAINTAINER is set, Build/* and Package/<name>/install recipes are tab-indented while the metadata block uses two spaces, BuildPackage is called with the literal package name, and the codeload.github.com/...? source URL matches the dominant in-tree pattern for GitHub tag tarballs (48 uses under libs/, no @GITHUB uses).

The open design question — whether this and #27953 should be subpackages of one source package, and what will consume the library — is still the outstanding item, and it has already been raised and answered in the thread, so it is not repeated here.


Generated by Claude Code

Tree-sitter is an incremental parsing library. It can build a concrete
syntax tree for a source file and efficiently update the syntax tree as
the source file is edited.

Signed-off-by: Valeriy Kosikhin <vkosikhin@gmail.com>
@BKPepe
BKPepe force-pushed the master-libtree-sitter branch from b943c60 to 1282f5b Compare October 5, 2026 07:58

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants