Repository navigation
Release date: 2026-11-24
This release adds one language and nine macros. It also fixes how many macros
name, count and show definitions. Many of those fixes change output values that
a dependent reads. Read "This release changes output" before you upgrade.
This release requires DuckDB 2.0.1. The duckdb submodule pin moved from
v2.0.0 to v2.0.1 (#363). The suite runs on the same DuckDB that the community
registry builds with. No macro was removed. No macro or table function changed
its arguments or its result columns.
This release changes output
Each row replaces a wrong answer, or a missing answer, with a right one. A query
that read the old value was already reading a wrong answer, but its result now
differs.
1. .tsx is its own language
.tsx files parse as tsx, not typescript (#329, caaf3fc, 3115da7).
| query | was | now |
|---|---|---|
language of App.tsx |
typescript |
tsx |
read_ast('App.tsx', 'typescript') |
rows | error: needs at least one file (0 rows under ignore_errors) |
A query that filters language = 'typescript' over a React tree loses its
.tsx rows. This is the one change in this release where a working query now
raises.
2. A C++ function is one function, not two (#360)
A C++ function_definition and its function_declarator were both function
definitions. Many macros listed each C++ function twice, and some treated the
declarator as a nested function. The declarator is now marked as a constituent
of its definition (#365, #368). C is not affected. Measured over test/data
(418 files, 28 languages):
| output | was | now |
|---|---|---|
ast_select('.function') |
1247 | 1228 |
ast_select('.function[params=1]') |
536 | 531 |
ast_to_blocks C++ headings |
47 | 29 |
ast_function_metrics, C++ |
1280 | 1262 |
ast_nesting_analysis, C++ |
1280 | 1262 |
ast_dead_code, C++ |
1008 | 999 |
ast_source_of_from, every C++ definition name |
45 rows | 27 rows |
ast_function_scope, every C++ definition |
491 nodes | 652 nodes |
qualified_name, nodes that differ |
— | 33, all C++ |
ast_definitions |
3733 | 3733 |
Two results grow, and both are fixes:
ast_function_scopegrows because a C++ function's own parameters were
outside its scope. The declarator's subtree counted as a nested function.ast_to_blocksC++ code blocks now hold the function's whole body. Before,
the declarator took the code block, which held only the signature line.
In outline style, a definition that holds a named definition gets a heading and
no code block. This rule is not new. C++ now follows it, as Python already does.
So a C++ main() that holds auto multiply = [](...) {...}; has a heading, and
multiply has the code block.
Parameter paths change from F[f] F[f] V[a] to F[f] V[a].
3. ast_definitions lists every bound name once
ast_definitions gains bare parameters, loop targets and self, and a
same-name parent and child pair collapses to one row (#288, #276, f460f04,
3be2a83). Over the corpus, rows go from 3,573 to 3,733 (+4.5%). ORDER BY
gains node_id.
4. The root node is named by its path
Each file's root node is named by its file path, or '<inline>' for
parse_ast (#186, e7e82e8). The root name is kept out of qualified_name.
A query that uses name IS NOT NULL to mean "a definition" now also gets the
root.
5. A TYPE_* node never binds a name
A type node never binds a name, and Swift binds only its name field (#64,
2f4f99a). This removes 86 false binders. ast_resolve and ast_definitions
see the change.
6. ast_to_blocks carries line numbers and whole lines
Headings and code blocks carry start_line and end_line. A code body is the
whole source lines, so an indented definition keeps its indent. The root
heading is left out (7f2131f, aa40f2b).
7. Smaller changes
| change | commits |
|---|---|
A Bash command name is the written text of command_name, minus outer quotes ("$cmd" → $cmd). Command substitution stays unnamed. |
dbc29ce, 6e06988 |
A JSX element is a call site (COMPUTATION_CALL), and its attributes are NAME_ATTRIBUTE. .call#Foo finds each use of a component. |
4fb1e21 |
| Parameter names and arity: Java varargs (#319), TypeScript and tsx rest parameters (#320), Kotlin (#323). | 7e74ca4 |
Kotlin interface and enum class report signature_type interface and enum, not class. sealed interface changes from sealed_class to interface. |
#362 |
The duckdb adapter reports file_path (it was ''). ast_source_of on a duckdb file raises an error that names tracker/bugs/043, instead of returning the wrong lines. |
9015cab |
ast_select with a selector list A, B returns the union. Before, it returned 0 rows with no error. A list item that is not a type, .class or #id raises. |
754889b, 945cf6a, 00f36a9 (#330) |
ast_select_rules and ast_select_list raise a clear error where they returned an unclear one. |
5562825 |
A TypeScript parameter's name reports its declared type in signature_type (a: number gives number, was identifier). A default value keeps identifier. tsx probably changes too: it shares the TypeScript extraction (read from the code, not run). |
#367 |
New
- Nine
_frommacros, which take a table name instead of a path:
ast_definitions_from,ast_source_of_from,ast_containing_line_from,
ast_in_range_from,ast_has_from,ast_not_has_from,ast_inside_from,
ast_precedes_from,ast_follows_from(#326). - The
tsxlanguage. Sitting Duck now parses 29 languages. - HTML elements by tag and id:
section#week(d52f4ad). :nth-child(An+B),oddandeven(#337,041639a).
Other fixes
ast_source_of_fromraises on a path mismatch, normalises./spellings,
and fails closed on a NULLfile_path.- The TypeScript and tsx parsers are regenerated for the
usingdeclaration
(289e343). :has()and:not()accept selector lists and simple selectors (00f36a9).
Internal
- The engine moved from
src/tocore/(ad15d50). The macro manifest is in
layout.yaml, and a gate checks the boundary between core and add-ons. - The conformance kit runs on a schedule in CI (
1a39b4e). This closes a known
issue from v1.18.4. - The registry-drift check warns on a pull request and fails on main (#364).
- The dead-dispatch plan is re-measured on main (#366).
Known issues
Found during this release, and not regressions
- The scope macros in
tree_analysis.sqljoin withoutfile_path. A call over
several files can mix one file's nodes into another file's function. - A C++ variable repeats in
qualified_name, for exampleV[z] V[z]. ast_patchis not guarded againsttracker/bugs/043. duckdb nodes report
line 1, soast_patchcan edit the wrong line of a SQL file.ast_source_of
raises instead.- A selector list with a pseudo-class or combinator item raises. This is the
declared scope of #330. ast_select('div')does not reach JSX elements, and JSXparametersis
empty.- A TypeScript rest parameter's name (
...rest: string[]) still reports
identifier. Inlet x: T = y, the valueyreports the typeT(#367).
Carried from earlier releases
:not()with a compound argument matches everything (#338).- An unknown node type matches nothing instead of being refused (#313).
:is-referencedmatches every function (#147), and:exportedincludes
methods and nested functions (#148).- Call-graph pseudo-classes can exhaust memory on a large tree (#164). This is
not re-measured here.
Upgrading
Read "This release changes output" first. This release is not drop-in for every
query. Four changes need action:
- A query that filters
language = 'typescript'must add'tsx'to keep its
.tsxfiles. - A query that counts C++ functions, or deduplicated C++ rows by hand, gets one
row per function. Remove the manual deduplication. - A query that counts
ast_definitionsrows gets more rows. - A query that uses
name IS NOT NULLto find definitions must also exclude
the root node (parent_id IS NULL).
Verification
Read by job ID from CI on the tag commit 6c971a0 (the merge of #368). Two
jobs share each "Build extension binaries" name, and only one of each pair runs
the suite. The job IDs say which.
| job | ID | log line |
|---|---|---|
linux_amd64, v2.0 test coverage (--require sitting_duck gate) |
138729551136 | ran tests: 206 passed, 5 skipped in 272s |
| linux_amd64 | 138729612545 | ran tests: 206 passed, 5 skipped in 303s |
| osx_arm64 | 138744243855 | ran tests: 206 passed, 5 skipped in 459s |
| windows_amd64 | 138744243929 | ran tests: 206 passed, 5 skipped in 641s |
| windows_amd64_mingw | 138744243870 | ran tests: 206 passed, 5 skipped in 542s |
| runtime grammar registration (C++ unit tests) | 138729341009 | All tests passed (11413 assertions in 211 test cases) |
| core-only build | 138729340350 | All tests passed (191 assertions in 1 test case) |
linux_arm64 and the three wasm builds compile and run no tests ("Tests are not
supported for linux_arm64.", "has no test target."). The other job of each pair
logs "Tests skipped by workflow input.". The parser-pin, macro-header,
macro-boundary, module-ABI, layout, taxonomy, language-reference, subset and
dev-build gates all succeed. 34 checks: 31 success, 3 skipped (the
matrix.duckdb_arch placeholders).
The suite has 206 test cases, one more than on 01fc705. #367 adds the file
test/sql/bugs/dead_dispatch_ts_parameter_identifier.test, and one file is one
test case.
The tag commit is 6c971a0, the merge of #368. Its first parent is ef8f886
(#366 and #367 merged after #365). Measured on earlier commits, for reference. main at 01fc705
(job 138298998083): ran tests: 205 passed, 5 skipped. #368 at b3e585b
(job 138332359981): ran tests: 205 passed, 5 skipped.
The output figures in section 2 were measured by Claude over test/data, on
builds of 152750d and of each fix, with outputs compared node by node. They
are not re-measured on the tag commit.