Compare commits

1 Commits
main ... 1.1

7 changed files with 32 additions and 302 deletions

View File

@@ -1,7 +1,8 @@
<services>
<service name="download_files" mode="manual" />
<service name="cargo_vendor" mode="manual">
<param name="srctar">tree-sitter-*.tar.gz</param>
<param name="srctar">tree-sitter-*.tar.xz</param>
<param name="update">true</param>
</service>
<service name="cargo_audit" mode="manual" />
</services>

View File

@@ -1 +1 @@
libtree-sitter0_25
libtree-sitter0

BIN
tree-sitter-0.22.6.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
tree-sitter-0.25.1.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,270 +1,3 @@
-------------------------------------------------------------------
Mon Feb 3 14:43:37 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.25.1:
* cli: Specify abi version via env var
* bindings: Correct Zig bindings to expose a language function
* lib: Prevent finished_tree assertion failure
* Correct build steps for WASM files
* rust: Correct doc comments
-------------------------------------------------------------------
Sat Feb 1 15:06:02 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.25.0:
Full changelog: https://github.com/tree-sitter/tree-sitter/releases/tag/v0.25.0
Notices:
* web-tree-sitter was rewritten in TypeScript
* Parsing and Querying should be cancelled using the "progress callback",
rather than setting a timeout or a cancellation flag
* MISSING nodes can now be queried
* The ts_node_child_containing_descendant function was removed; use
ts_node_child_with_descendant
* TSInput now includes a (mandatory) new field DecodeFunction
Breaking:
* Properly handle UTF-16 endianness encoding
* Bump internal abi to 15
* Update playground with new web bindings
* bindings: Update swift bindings
* cli: Remove migration code for tree-sitter.json
* generate: Use regex_syntax::Hir for expanding regexes
* lib: Remove ts_node_child_containing_descendant
* lib: Add the ability to specify a custom decode function
* web: Rewrite the library in TypeScript
* web: Use the WASM module in the bindings, and not the other way around
* web: Rename pattern to patternIndex in QueryMatch
* web: Deprecate Language.query in favor of new Query
- increase minimum rust version
-------------------------------------------------------------------
Fri Jan 17 03:31:29 UTC 2025 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.7:
* lib: Use inclusive range check for non-empty nodes in next sibling
computation
-------------------------------------------------------------------
Tue Dec 31 09:37:57 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.6:
* playground: backport new playground
-------------------------------------------------------------------
Fri Dec 13 05:01:22 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.5:
* fix(lib): correct next sibling of zero width node
* fix(lib): use clock_gettime on macOS again
* feat: move scripts to xtasks
* build: configure clippy lints at the workspace level
* chore: remove unnecessary fuzz and profile helpers
* build: tune compiler warnings
* fix: compiler warning
* build: treat incompatible pointer warning as error
* fix(lib): handle compiler warnings
* build(cmake): link wasmtime dependencies
* fix: sync cmake with master
-------------------------------------------------------------------
Mon Nov 11 00:46:35 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.4:
* loader: Add language_for_configuration
* loader: Add error message when a tree-sitter.json file is invalid
* node: Support single-file executables via bun build --compile
* node: Update bindings when necessary
* Return LanguageRef in Parser::language
* bindings: Update CMakeLists.txt file
* cli: Pass all fields to tree-sitter.json in init
* cli: Use contains over is in warning
* cmake: Use current source dir for EXISTS check
* generate: Do not set the unit reduction symbol if it's in the extras array
* init: Use current path if unspecified
* init: Use camel name from config in missing spots
* lib: Simplify edge cases with zero-width tokens
* lib: Correctly fetch the node name in query errors
* loader: Don't print warnings if the file is not found
* loader: Improve language lookup speed
* bindings: Rename cmake test target
* Memory errors in wasm_store
-------------------------------------------------------------------
Thu Oct 10 10:32:11 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.3:
* build: fix incorrect variable checks
* fix(lib): correct unexpected side effect in get_column when the
lexer is at EOF
* build(deps): bump wasmtime to v25.0.2
-------------------------------------------------------------------
Sun Oct 6 03:45:19 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.2:
* Drop legacy binding updates
* templates: Properly replace author email
* templates: Update npm packages
* bindings: Improve cmake file
* cmake: Support amalgamated build
* cmake: Correct library scopes
* make: Fix tree-sitter.pc generation
-------------------------------------------------------------------
Fri Oct 4 06:39:38 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.24.1:
* fix(generate): move generated header files into the generate crate
- update do 0.24.0:
* docs: add Kotlin to the playground
* fix(generate): remove necessary files from gitignore template
* feat(generate): bump tree-sitter dev dependency to 0.23
* fix(cli): remove conflicting short flags in the fuzz subcommand
* feat(bindings): bump go-tree-sitter version
* docs(changelog): add 0.23.0 release notes
* feat: add an API to time out query executions
* fix(generate): disallow inline variables referencing themselves
* fix(rust): add missing TSNode functions
* fix(lib): correct extra node creation from non-zero root-alias cursors
* fix(test): exit with an error if a test marked with :error has no error
* fix(test): retain attributes when running test -u
* feat(language): derive Clone and Copy on LanguageFn
* fix(lib): backtrack to the last relevant iterator if no child was found
* fix(generate): add tree-sitter to the dev-dependencies of the Cargo.toml
* fix(binding_web): correct edit signature
* build(lib): build using cmake
* fix(cli): keep skipped tests unchanged in the test/corpus
* feat!: remove C++ support for external scanners
* chore: clippy lints
* feat!: remove the build-wasm subcommand
* fix(generate): do not generate large character sets for unused variables
* fix(binding_web): remove nonexistent function definition
* feat: add field_name_for_named_child
* fix(cli): remove duplicate short options from fuzz command
* fix: correct comment quote
* fix(generate): remove excludes in Package.swift
* chore(bindings): update rust lib docs
* build(deps): bump the cargo group across 1 directory with 11 updates
* fix(docs): fix highlight readme example using compatible versions
* fix(lib): peek at the next sibling when iterating to find the child
* build(make): support darwin cross-compile
* fix(wasm): use / paths for workdir
* fix: properly handle utf8 code points for highlight and tag assertions
* feat: add root field in node-types.json
* fix(fuzz): skip tests marked with :skip & don't report errors on them
* feat: add eslint configuration package
* chore: remove compile_flags.txt
* style(tests): do not use .as_bytes().len() on strings
* feat: provide a rebuild flag to force rebuild parsers
* feat(test): test all queries
* fix(test): correctly handle assertions on empty lines
* feat: add shell completions
* refactor(cli): break out subcommand logic into separate functions
* fix: do not generate spurious files if the grammar path is not the detected
* fix: disallow empty string literals in rules
* feat(cli): add a no-ranges flag to the parse command
* fix(lib): correct descendant-for-range behavior with zero-width tokens
* fix(lib): silence warnings with -Wpedantic
* style(lib): add parameter names in declarations that are missing them
* feat!: move generation of grammar files to an init command
* chore: clippy fixes
* feat: move generate logic to its own crate
* feat(generate): add a no-op --no-bindings flag
* Update cli/src/main.rs
* refactor: improve the grammar schema
* chore: update generate crate paths
* build: bump deps
* feat(init): add an update flag
* feat!: implement StreamingIterator instead of Iterator for `Query…`
* fix(lib)!: child_containing_descendant now returns direct children
* feat: add --overview-only to test subcommand
* fix: correct test name parsing when the prior test has equal signs
* fix: handle more cases of editing subtrees that depend on column values
* fix: exclude APIs that dup given file descriptors from WASI builds
* feat: move tree-sitter configuration to dedicated file
* fix(cli): generate the parser version from the config as well
* fix: deprecate child_containing_descendant
* fix(bindings): use RUST_BINDING_VERSION in Cargo.toml template
* fix(bindings): lower go version to 1.22
* build(bindings): add CMakeLists.txt file
* feat(api): expose function to check if symbol represents a supertype
* fix(init): fix some schema issues
* fix(init): don't prompt to reconfigure
* fix(init): do not migrate package.json on error
* fix(build): correct wasm root path lookup
* fix(generate): remove unused rules
* fix(generate): add *.scm section to .editorconfig template
* fix(generate): filter out unused rules in other spots
* build(cmake): link wasmtime dependencies
* fix(lib): ensure an unfinished state was found before removing it
* fix(build): force rebuild parsers when build is invoked
* build(xtask): bump cmake version in bump-version
* build(xtask): only consider major and minor versions when validating
* build(xtask): ignore the language crate
* build: bump language to 0.1.1
-------------------------------------------------------------------
Tue Oct 1 06:51:32 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.23.1:
* fix(generate): remove necessary files from gitignore template
* fix(cli): remove conflicting short flags in the fuzz subcommand
* feat(generate): bump tree-sitter dev dependency to 0.23
* feat(bindings): bump go-tree-sitter version
* fix(lib): correct extra node creation from non-zero root-alias cursors
* fix(rust): add missing TSNode functions
* fix(test): exit with an error if a test marked with :error has no error
* fix(test): retain attributes when running test -u
* fix(generate): disallow inline variables referencing themselves
* feat(language): derive Clone and Copy on LanguageFn
* fix(lib): backtrack to the last relevant iterator if no child was found
* fix(generate): add tree-sitter to the dev-dependencies of the Cargo.toml
* fix(binding_web): correct edit signature
* fix(cli): keep skipped tests unchanged in the test/corpus
* fix(generate): do not generate large character sets for unused variables
* fix(binding_web): remove nonexistent function definition
* fix(cli): remove duplicate short options from fuzz command
* fix(generate): remove excludes in Package.swift
* chore(bindings): update rust lib docs
* fix: correct comment quote
* build(make): support darwin cross-compile
* fix(lib): peek at the next sibling when iterating to find the child
* fix(docs): fix highlight readme example using compatible versions
* build(deps): bump the cargo group across 1 directory with 11 updates
* fix(wasm): use / paths for workdir
* fix: properly handle utf8 code points for highlight and tag assertions
* fix(fuzz): skip tests marked with :skip & don't report errors on them
* fix: do not generate spurious files if the grammar path is not the default path
* fix: disallow empty string literals in rules
* fix(lib): correct descendant-for-range behavior with zero-width tokens
* fix: correct test name parsing when the prior test has equal signs
* fix: handle more cases of editing subtrees that depend on column values
* fix: exclude APIs that dup given file descriptors from WASI builds
-------------------------------------------------------------------
Mon Aug 26 16:33:54 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
- update to 0.23.0:
* test: modernize scanner files
* fix: always reset to the first language when iterating over language
* feat(zig): update outdated path syntax
* feat(bindings): add query constants to python
* style(bindings): fix indent & line endings
* feat(dsl)!: support other JS runtimes
* feat(bindings): add node, python, swift tests
* introduce tree-sitter-language crate for grammar crates to depend on
* refactor: remove ansi_term dependency
* refactor: remove difference dependency
* feat: add fuzz subcommand
* fix(wasm): update test
* feat(lib): add ts_query_end_byte_for_pattern
* fix(rust): fix new clippy warnings
* feat(lib): support no_std
* Reset language when resetting wasm store
* docs: clean up binding & parser lists
* clone wasm store engine
* fix(cli): dedup preceding_auxiliary_symbols
- use of ldconfig_scriptlets, and removal of the duplicate setting of buildflags
-------------------------------------------------------------------
Fri Jun 21 20:32:46 UTC 2024 - Richard Rahl <rrahl0@disroot.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package tree-sitter
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,15 @@
#
%define somajor 0_25
%define somajor 0
%define libdirname tree_sitter
Name: tree-sitter
Version: 0.25.1
Version: 0.22.6
Release: 0
Summary: An incremental parsing system for programming tools
License: GPL-2.0-only AND MIT
URL: https://tree-sitter.github.io/
Source0: https://github.com/tree-sitter/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://github.com/tree-sitter/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source1: vendor.tar.zst
Source11: baselibs.conf
Source20: tree-sitter-target.py
@@ -34,7 +35,7 @@ Source24: compile-macros.sh
Source25: treesitter_grammar.attr
Source26: treesitter_grammar.req
BuildRequires: cargo-packaging
BuildRequires: rust > 1.82.0
BuildRequires: rust > 1.40
Requires: lib%{name}%{somajor} = %{version}
Requires: nodejs
%{?suse_build_hwcaps_libs}
@@ -54,7 +55,6 @@ edited. Tree-sitter aims to be:
%package -n lib%{name}%{somajor}
Summary: Asychronous I/O support library
Obsoletes: lib%{name}0 < %{version}
%description -n lib%{name}%{somajor}
Tree-sitter is a parser generator tool and an incremental parsing
@@ -85,14 +85,19 @@ sed -i -e '/^VERSION/s/:= .*$/:= %{version}/' Makefile
%build
%{cargo_build}
%make_build PREFIX=%{_prefix} LIBDIR=%{_libdir} INCLUDEDIR=%{_includedir}
export CFLAGS='%{optflags}'
export PREFIX='%{_prefix}' LIBDIR='%{_libdir}'
%make_build
sh %{SOURCE24}
%install
%make_install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} INCLUDEDIR=%{_includedir}
install -p -m 0755 -D %{_builddir}/%{name}-%{version}/target/release/%{name} \
%{buildroot}%{_bindir}/%{name}
export PREFIX='%{_prefix}' LIBDIR='%{_libdir}' INCLUDEDIR='%{_includedir}'
%make_install
install -p -m 0755 -D %{_builddir}/%{name}-%{version}/target/release/tree-sitter \
%{buildroot}%{_bindir}/tree-sitter
find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print
install -Dm644 macros.treesitter %{buildroot}%{_rpmmacrodir}/macros.treesitter
install -Dm755 %{SOURCE20} %{buildroot}%{_rpmconfigdir}/$(basename %{SOURCE20})
@@ -100,37 +105,28 @@ install -Dm755 %{SOURCE20} %{buildroot}%{_rpmconfigdir}/$(basename %{SOURCE20})
install -Dm644 %{SOURCE25} %{buildroot}%{_fileattrsdir}/$(basename %{SOURCE25})
install -Dm755 %{SOURCE26} %{buildroot}%{_rpmconfigdir}/$(basename %{SOURCE26})
#remove .a/.la files
find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print
%post -n lib%{name}%{somajor} -p /sbin/ldconfig
# stupid workaround for "integrating" the grammars into neovim
install -d %{buildroot}%{_libdir}/tree_sitter
#fix pkgconfig file
for i in lib include; do
sed -i 's|'$i'dir=${prefix}//usr/|'$i'dir=${prefix}/usr/|g' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
done
%ldconfig_scriptlets -n lib%{name}%{somajor}
%postun -n lib%{name}%{somajor} -p /sbin/ldconfig
%files
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_bindir}/%{name}
%{_rpmconfigdir}/%{name}-target.py
%{_bindir}/tree-sitter
%{_rpmconfigdir}/tree-sitter-target.py
%{_rpmmacrodir}/macros.treesitter
%{_rpmconfigdir}/treesitter_grammar.req
%{_fileattrsdir}/treesitter_grammar.attr
%files -n lib%{name}%{somajor}
%license LICENSE
%{_libdir}/lib%{name}.so.*
%dir %{_libdir}/tree_sitter
%{_libdir}/*.so.*
%files devel
%doc docs/
%{_includedir}/tree_sitter
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%dir %{_includedir}/%{libdirname}/
%{_includedir}/%{libdirname}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog

BIN
vendor.tar.zst (Stored with Git LFS)

Binary file not shown.