AutoSync: Update Tree-Sitter beyond v0.24
Author: Rot127Created Sep 15, 2026Updated Sep 15, 2026
LabelsbugAuto-Sync
Tree-sitter is currently fixed to v0.24, because in +v0.25 the API changed and AutoSync fails with:
Run python -m unittest src/autosync/cpptranslator/Tests/test_patches.py
E
======================================================================
ERROR: setUpClass (src.autosync.cpptranslator.Tests.test_patches.TestPatches)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/capstone/capstone/suite/auto-sync/src/autosync/cpptranslator/Tests/test_patches.py", line 92, in setUpClass
cls.translator = CppTranslator.Translator(configurator, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/autosync/cpptranslator/CppTranslator.py", line 208, in __init__
self.collect_template_instances()
File "/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/autosync/cpptranslator/CppTranslator.py", line 479, in collect_template_instances
self.template_collector.collect()
File "/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/autosync/cpptranslator/TemplateCollector.py", line 110, in collect
query: Query = self.lang_cpp.query(self.get_template_pattern())
^^^^^^^^^^^^^^^^^^^
AttributeError: 'tree_sitter.Language' object has no attribute 'query'
----------------------------------------------------------------------
Ran 0 tests in 0.005s
FAILED (errors=1)
Error: Process completed with exit code 1.
It needs an update.
Source: capstone-engine/capstone