pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/tree-sitter



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Feb  2 15:54:45 UTC 2025

Modified Files:
        pkgsrc/textproc/tree-sitter: Makefile PLIST distinfo
        pkgsrc/textproc/tree-sitter/patches: patch-Makefile

Log Message:
tree-sitter: update to 0.25.1.

Fix pkg-config file path.

Features

    cli: Specify abi version via env var (#4173)

Bug Fixes

    bindings: Correct Zig bindings to expose a language function
    lib: Prevent finished_tree assertion failure (#4176)

Documentation

    Correct build steps for WASM files

Build System and CI

    Use ubuntu-22.04 for x64 builds (#4175)
    Bump version to 0.25.1

Other

    rust: Correct doc comments

0.25.0

Notices

This is a large release. As such, a few major changes and how to adapt to them are outlined below:

    web-tree-sitter was rewritten in TypeScript. With that, we also now publish the sourcemaps, and debug builds for the library. We also publish both CommonJS and ESM modules.
    The internal ABI was bumped to 15. The main benefits this brings is that the language name, version, supertype info, and reserved words are added to the parsers. To use ABI 15, you must have a 
tree-sitter.json file in your repository, since the version information for the parser is pulled from this file.
    Parsing and Querying should be cancelled using the "progress callback", rather than setting a timeout or a cancellation flag, which are now deprecated. To do so, use the "parse/query with 
options" function in the bindings you choose to use, in the next release the old way of timing out parsing will be removed, which allows us to get rid of our dependency on the time.h headers in the 
core library.
    MISSING nodes can now be queried, and queries involving supertypes are properly validated now.
    The ts_node_child_containing_descendant function was removed; use ts_node_child_with_descendant instead (which has nearly the same behavior but can also return descendant.)
    TSInput now includes a (mandatory) new field DecodeFunction, which allows passing a custom decode function. To use the builtin function, pass NULL.
    In the DSL, there is now a RustRegex function, which takes in a Rust regex as a string. All of the capabilities of Rust's regex engine are available here, which allows for some nice features that 
aren't possible with JavaScript regexes.
    We've migrated our documentation to mdBook, and greatly improved the docs.

Breaking

    Properly handle UTF-16 endianness encoding (#3740)
    Bump internal abi to 15 (#3803)
    Update playground with new web bindings (#4121)
    bindings: Update swift bindings (#4154)
    cli: Remove migration code for tree-sitter.json (#4107)
    generate: Use regex_syntax::Hir for expanding regexes (#3831)
    lib: Remove ts_node_child_containing_descendant (#4107)
    lib: Add the ability to specify a custom decode function (#3833)
    web: Rewrite the library in TypeScript (#4121)
    web: Use the WASM module in the bindings, and not the other way around (#4121)
    web: Rename pattern to patternIndex in QueryMatch (#4141)
    web: Deprecate Language.query in favor of new Query (#4141)

Features

    Drop legacy binding updates (#3734)
    Bump version to 0.25 (#3752)
    Allow setting the output directory for generated source files (#2614)
    Move scripts to xtasks (#3758)
    Add CST pretty-printer for parser output (#3762)
    Add version subcommand for versioning grammars (#3786)
    Add build sha to parser.c header comment (#3828)
    Implement a cache for get_column (#2503)
    Generate schema in tree-sitter.json (#3947)
    Support querying missing nodes (#3887)
    Add flag to output css classes instead of inline styles in HTML highlighter output (#3879)
    Add xtask to bump emscripten-version (#4015)
    Add 'reserved word' construct (#3896)
    Add Supertype API (#3938)
    Support passing in a Rust regex in the grammar dsl (#4076)
    Allow parser balancing to be cancellable (#4122)
    Remove lazy_static in favor of LazyLock (#4130)
    Add and apply eslint config (#4121)
    Begin autogenerating web-tree-sitter.d.ts (#4121)
    Publish both CJS and ESM files (#4121)
    Add a patternIndex field to QueryCapture (#4141)
    Improve PredicateStep types (#4141)
    Add the semantic version to TSLanguage, and expose an API for retrieving it (#4135)
    Add error information in the progress callback (#3987)
    bindings: Auto-detect scanners (#3809)
    bindings: Drop language name from node (#3184)
    bindings: Update some binding files (#3952)
    bindings: Drop python 3.9 support (#3799)
    bindings: Support free-threaded python build (#3799)
    bindings: Add opt-in zig bindings (#4144)
    bindings: Use cc 1.2 for Rust (#4156)
    cli: Verify assertions for every carat in tests, not just the first one (#3927)
    cli: Add nushell completions (#4000)
    cli: Don't validate email addresses in init command (#3999)
    cli: Show parse times in testing output (#3939)
    cli: Display parse and edit times separately for parse --time (#4016)
    cli: Make input handling agnostic (#4054)
    cli: Rework parse to use new input handler (#4054)
    cli: Rework query to use new input handler (#4054)
    cli: Rework highlight to use new input handler (#4054)
    cli: Rework tags to use new input handler (#4054)
    cli: Add json summary of parsing (#4048)
    cli: Allow test subcommand to include/exclude by corpus test file names (#4095)
    cli: Improve readability of parse debug output (#4118)
    generate: Add a comment with the tree-sitter version (#3825)
    generate: Add .exp and .lib files to gitignore template (#4079)
    generate: Explicitly disallow non-terminals in non-terminals (#4111)
    generate: Properly filter out unused rules (#4111)
    generate: Add an extra field for extra nodes in node-types.json (#4116)
    generate: Defer to ABI 14 if tree-sitter.json doesn't exist, rather than hard failing (#4156)
    highlight: Mark TSHighlighter fields as pub (#3990)
    init: Allow dashes in scopes (#4142)
    init: Add an optional funding field (#4142)
    init: Add a class-name field to grammars (#4142)
    init: Add a title field to grammars (#4142)
    lib: Wrap subtrees with changes in green circles (#3741)
    lib: Add the language name (#3184)
    lib: Add ts_parser_parse_with_options (#3843)
    lib: Add ts_query_cursor_exec_with_options (#3843)
    lib: Use const for TSCharacterRanges (#4027)
    lib: Implement Send + Sync for WasmStore (#4130)
    loader: Add language_for_configuration (#3816)
    loader: Add error message when a tree-sitter.json file is invalid (#3897)
    loader: Support multi-barreled file extensions (#3880)...


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/textproc/tree-sitter/Makefile \
    pkgsrc/textproc/tree-sitter/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/textproc/tree-sitter/PLIST
cvs rdiff -u -r1.6 -r1.7 pkgsrc/textproc/tree-sitter/patches/patch-Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/tree-sitter/Makefile
diff -u pkgsrc/textproc/tree-sitter/Makefile:1.15 pkgsrc/textproc/tree-sitter/Makefile:1.16
--- pkgsrc/textproc/tree-sitter/Makefile:1.15   Wed Jan 29 13:42:31 2025
+++ pkgsrc/textproc/tree-sitter/Makefile        Sun Feb  2 15:54:44 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.15 2025/01/29 13:42:31 adam Exp $
+# $NetBSD: Makefile,v 1.16 2025/02/02 15:54:44 wiz Exp $
 
-DISTNAME=      tree-sitter-0.24.7
+DISTNAME=      tree-sitter-0.25.1
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=tree-sitter/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -12,6 +12,6 @@ LICENSE=      mit
 
 USE_CC_FEATURES=       c11
 USE_TOOLS+=            gmake
-PKGCONFIG_OVERRIDE+=   tree-sitter.pc.in
+PKGCONFIG_OVERRIDE+=   lib/tree-sitter.pc.in
 
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/tree-sitter/distinfo
diff -u pkgsrc/textproc/tree-sitter/distinfo:1.15 pkgsrc/textproc/tree-sitter/distinfo:1.16
--- pkgsrc/textproc/tree-sitter/distinfo:1.15   Wed Jan 29 13:42:31 2025
+++ pkgsrc/textproc/tree-sitter/distinfo        Sun Feb  2 15:54:45 2025
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.15 2025/01/29 13:42:31 adam Exp $
+$NetBSD: distinfo,v 1.16 2025/02/02 15:54:45 wiz Exp $
 
-BLAKE2s (tree-sitter-0.24.7.tar.gz) = d538c9df24144b4ed091da4a9eef07a3093407add61497ff42d019d46b759862
-SHA512 (tree-sitter-0.24.7.tar.gz) = 50dff046236b893ba138ec069e0014e20216f19193bc2445bb9afdc3ecafb9769222d5c406fbf34c468b467a7a07d247d95e3c0b8b14687a5c29754f4dc9d503
-Size (tree-sitter-0.24.7.tar.gz) = 3020323 bytes
-SHA1 (patch-Makefile) = 70281fd4ffb12d92d680cdee985b193add3cc1cb
+BLAKE2s (tree-sitter-0.25.1.tar.gz) = 68b04a0597dd25267ad7d7323bf95983aea06a557b82aad96c753678db29b3cf
+SHA512 (tree-sitter-0.25.1.tar.gz) = 9861b18c7209e3c37d180a399bcae181cea46c4e58eff743ff6044ed0f2923ee838fa88993f1266272e07163748d5df1bef7d7dc6d8800e004e8af1227e489af
+Size (tree-sitter-0.25.1.tar.gz) = 855493 bytes
+SHA1 (patch-Makefile) = dde30657146c302691bd25e26eff953daee37def

Index: pkgsrc/textproc/tree-sitter/PLIST
diff -u pkgsrc/textproc/tree-sitter/PLIST:1.5 pkgsrc/textproc/tree-sitter/PLIST:1.6
--- pkgsrc/textproc/tree-sitter/PLIST:1.5       Tue Oct  8 15:40:41 2024
+++ pkgsrc/textproc/tree-sitter/PLIST   Sun Feb  2 15:54:45 2025
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.5 2024/10/08 15:40:41 wiz Exp $
+@comment $NetBSD: PLIST,v 1.6 2025/02/02 15:54:45 wiz Exp $
 include/tree_sitter/api.h
 lib/libtree-sitter.a
 lib/libtree-sitter.so
 lib/libtree-sitter.so.0
-lib/libtree-sitter.so.0.24
+lib/libtree-sitter.so.0.25
 lib/pkgconfig/tree-sitter.pc

Index: pkgsrc/textproc/tree-sitter/patches/patch-Makefile
diff -u pkgsrc/textproc/tree-sitter/patches/patch-Makefile:1.6 pkgsrc/textproc/tree-sitter/patches/patch-Makefile:1.7
--- pkgsrc/textproc/tree-sitter/patches/patch-Makefile:1.6      Thu Dec 26 10:57:48 2024
+++ pkgsrc/textproc/tree-sitter/patches/patch-Makefile  Sun Feb  2 15:54:45 2025
@@ -1,9 +1,9 @@
-$NetBSD: patch-Makefile,v 1.6 2024/12/26 10:57:48 wiz Exp $
+$NetBSD: patch-Makefile,v 1.7 2025/02/02 15:54:45 wiz Exp $
 
 - Avoid to possibly pass extra optimization CFLAGS
 - Do not override PCLIBDIR for FreeBSD, NetBSD and DragonFly
 
---- Makefile.orig      2024-12-11 06:37:19.000000000 +0000
+--- Makefile.orig      2025-02-01 02:11:10.000000000 +0000
 +++ Makefile
 @@ -25,7 +25,7 @@ OBJ := $(SRC:.c=.o)
  
@@ -12,9 +12,9 @@ $NetBSD: patch-Makefile,v 1.6 2024/12/26
 -CFLAGS ?= -O3 -Wall -Wextra -Wshadow -Wpedantic -Werror=incompatible-pointer-types
 +CFLAGS ?= -Wall -Wextra -Wshadow -Wpedantic -Werror=incompatible-pointer-types
  override CFLAGS += -std=c11 -fPIC -fvisibility=hidden
+ override CFLAGS += -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE
  override CFLAGS += -Ilib/src -Ilib/src/wasm -Ilib/include
- 
-@@ -45,9 +45,6 @@ else
+@@ -46,9 +46,6 @@ else
        SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR)
        LINKSHARED += -shared -Wl,-soname,libtree-sitter.$(SOEXTVER)
  endif



Home | Main Index | Thread Index | Old Index