GitNexus/gitnexus/vendor
Gergo Magyar 0cdc3dfe39 fix(lbug): bump @ladybugdb/core to 0.21.2 to stop doubled rows after delete and re-copy
LadybugDB 0.21.0 and 0.21.1 return every row of a table that spans more
than one native vector twice once the incremental writeback has DETACH
DELETEd it and a COPY into an earlier table has run. NodeGroup::scan let a
morsel that ended before the group's first live row wrap an unsigned
subtraction and rescan to the end of the group (LadybugDB #1085, fixed in
0.21.2). No primary key error fires. The identity guard from #3442 stops
the run with "unexpected or duplicate ID", so a Swift edit that pulls every
importer into the write set failed on repos with more than 2048 structs.
Only unreleased main was affected: 1.6.12 ships 0.18.3.

Pin 0.21.2 in package.json, update the six @ladybugdb/core entries in the
lockfile, and move coreVersion in the vendored FTS manifest. The FTS
extension stays at 0.21.0 because no v0.21.1 or v0.21.2 artifact is
published; the pairing assertion and its unit tests pass.

Add a regression to the delete-nodes-for-files suite: 2049 structs with
CONTAINS edges are loaded, every file is deleted, the graph is loaded
again, and each id and edge must appear exactly once.

Verification (Linux, Node 22.18):
- lbug-delete-nodes-for-files: 11/11 on 0.21.2. With the 0.21.1 native
  packages swapped in, the new test fails with 4098 rows instead of 2049.
- Reporter recipe end to end on the built CLI: incremental analyze exits 0
  with no duplicate ids on a Swift-heavy fixture and on a 70-file Python
  fixture, with and without FTS. On 0.21.1 the Swift fixture exits 1.
- A 0.21.1-written database opens and reads under 0.21.2.
- prettier, eslint and typecheck:tests are clean on the changed files.
- The full lbug-db project had not finished when this was committed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 05:00:00 +00:00
..
lbug-fts fix(lbug): bump @ladybugdb/core to 0.21.2 to stop doubled rows after delete and re-copy 2026-10-14 05:00:00 +00:00
leiden perf(communities): fix the O(communities x N) copy in vendored Leiden, wire Icebug to its real API (#2337) (#2692) 2026-07-25 13:23:17 +01:00
tree-sitter-c fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-dart fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-kotlin fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-objc fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-proto fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-swift fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
tree-sitter-zig fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00
README.md fix(deps): upgrade native tree-sitter to 0.25.1 (#3531) 2026-10-10 13:07:59 +03:00

Vendored Tree-sitter grammars

These grammars use the bundled Tree-sitter 0.25.1 runtime (ABI 13–15). Generated C sources and scanners must be copied from upstream; never patch them by hand. JavaScript/TypeScript compatibility adapters belong in GitNexus.

Grammar Version / snapshot Upstream source commit
c 0.24.2-gb780e47 b780e47fc780
dart 1.0.0-gbe07cf7 be07cf7118d3
proto 0.6.0-gd7d1542 d7d15427321d
kotlin 0.4.0-g1852ea1 1852ea17b7f6
objc 3.0.2-g181a81b 181a81b8f23a
zig 1.1.2-g6479aa1 6479aa13f32f
swift 0.7.2 7b7909f2f6b9

Swift 0.7.2 is the newest release that passes our declaration-ownership tests. Both 0.7.3 and 0.7.4 move a later top-level struct inside an earlier class after a conditional group splits a function header. That input is invalid Swift, but preserving recovery for partial source is an existing GitNexus contract. The hold in .github/vendored-grammars.json remains until the real-parser and worker-pipeline tests in tree-sitter-languages.test.ts and swift-conditional-directive.test.ts pass with a newer upstream grammar. No generated source was patched to preserve this behavior.

To refresh a grammar:

  1. Resolve an immutable upstream commit (Swift publishes generated sources on *-with-generated-files tags). Copy src/ runtime/build inputs and bindings/node/binding.cc byte-for-byte. Keep the GitNexus CommonJS loader and binding.gyp; upstream C's ESM loader uses top-level await and cannot be substituted into the synchronous worker import path.
  2. Update the vendor package version, _upstreamCommit, _vendoredBy, this table and any hold in .github/vendored-grammars.json. GitHub snapshots use <upstream-version>-g<sha7> so the monitor recognizes the installed commit.
  3. Run semantic tests, including CFG and call/reference resolution. Successful loading, parsing or definition captures alone do not prove compatibility.
  4. Let build-tree-sitter-prebuilds.yml rebuild and execute the grammar on all six {linux,darwin,win32}-{x64,arm64} hosts. Check the installed tarball too; it must include the regenerated binaries and runtime metadata. Source builds use the repository checkout, which also contains the build inputs.

Protobuf's upstream syntax node collides with node-tree-sitter 0.25.1's JavaScript SyntaxNode subclass generator. Its gRPC plugin uses a private metadata wrapper to retain the native node and field/query APIs without changing upstream sources. Native loading and comment/string-safe fallback extraction are covered in test/unit/group/grpc-extractor.test.ts.