Skip to content

feat(extraction): index ArkTS (.ets) at the extraction tier - #149

Merged
sunerpy merged 1 commit into
mainfrom
feat/upstream-1.4.1-defer-h1-arkts
Jul 14, 2026
Merged

sunerpy merged 1 commit into
mainfrom
feat/upstream-1.4.1-defer-h1-arkts

Conversation

@sunerpy

@sunerpy sunerpy commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Upstream-sync DEFER item H1 — adds ArkTS (.ets) as a first-class Tier-1 extraction language (colby #1186, extraction half). ArkTS is HarmonyOS's TypeScript superset; the dedicated tree-sitter-arkts = "0.2.0" grammar parses its ArkUI struct components (plain tree-sitter-typescript can't). .ets files now index functions, classes, ArkUI struct components, methods, imports, and call edges.

  • New Language::ArkTs variant + .ets mapping; ARKTS_SPEC cloned from TypeScript with struct_declaration → struct symbol; tree-sitter-arkts pinned from crates.io (no vendored grammar); store parse_language learns "arkts"; dedicated arkts golden fixture.

Deferred (recorded, not built): the ArkUI dispatch bridges from the upstream commit — callback synthesizer, @Component/@Builder/@Styles attribute-chain resolution, state→build() re-render edges, the ohpm workspace-package import resolver, and the decorator hook. This port has no callback-synthesis subsystem, and these are the same non-Godot framework-resolution machinery it already leaves out. ArkTS joins at the extraction tier like the other 24 Tier-1 languages.

Verification

  • make ci green (fmt + clippy + test + guardrail); cargo test --workspace 0 failed.
  • New tests: arkts_extension_maps_to_arkts, plain_ts_stays_typescript, arkts_extracts_struct_function_class_import_call, enum round-trip at 37, arkts golden self-equivalence + committed-match, schema_parity green.
  • Existing 6 goldens (cpp/godot/ruby/mini/metal/cuda) byte-identical, NO regen; .schema unchanged (language is a stored TEXT value, not DDL).
  • No vendored grammar; guardrail clean; Cargo.lock gains only tree-sitter-arkts.

DEFER item H1 of the 1.2.0→1.4.1 upstream sync. Remaining: Solidity, Nix, HCL/Terraform, Erlang, CFML (gated); COBOL + VB.NET deferred (no crates.io grammar).

Ports the extraction half of upstream colby ArkTS support (#1186). ArkTS is
HarmonyOS's TypeScript superset; the dedicated tree-sitter-arkts grammar parses
its ArkUI `struct` components, which plain tree-sitter-typescript cannot.
`.ets` files now index their functions, classes, ArkUI `struct` components,
methods, imports, and call edges as a first-class Tier-1 language.

Adds the `Language::ArkTs` variant, the `.ets` extension mapping, an
`ARKTS_SPEC` cloned from the TypeScript spec with `struct_declaration` mapped to
a struct symbol, the `tree-sitter-arkts = "0.2.0"` crates.io grammar (no
vendored grammar), and a dedicated arkts golden fixture. The store's language
parser learns "arkts" so indexing an `.ets` file round-trips through the DB.

The ArkUI dispatch bridges from the upstream commit — the callback synthesizer,
@Component/@Builder/@Styles attribute-chain resolution, state->build() re-render
edges, the ohpm workspace-package import resolver, and the decorator hook that
feeds them — are deferred: this port has no callback-synthesis subsystem, and
those bridges are the same non-Godot framework-resolution machinery it already
leaves out. ArkTS joins at the same extraction tier as the other 24 Tier-1
languages.

The language enum is stored as a TEXT value, not DDL, so the golden .schema is
unchanged and the six existing golden fixtures are byte-identical (no regen);
only the new arkts fixture is added.
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.18605% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/codegraph-extract/src/lang/arkts.rs 80.79% 34 Missing ⚠️

❌ Your patch check has failed because the patch coverage (84.18%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
- Coverage   95.53%   95.49%   -0.05%     
==========================================
  Files         118      119       +1     
  Lines       58200    58414     +214     
==========================================
+ Hits        55603    55784     +181     
- Misses       2597     2630      +33     
Files with missing lines Coverage Δ
crates/codegraph-core/src/types.rs 100.00% <100.00%> (ø)
crates/codegraph-extract/src/engine.rs 95.64% <100.00%> (+0.04%) ⬆️
crates/codegraph-extract/src/lang/mod.rs 100.00% <100.00%> (ø)
crates/codegraph-extract/src/walker.rs 92.37% <100.00%> (+0.05%) ⬆️
crates/codegraph-store/src/queries.rs 98.18% <100.00%> (+<0.01%) ⬆️
crates/codegraph-extract/src/lang/arkts.rs 80.79% <80.79%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sunerpy
sunerpy merged commit 9a65702 into main Jul 14, 2026
7 checks passed
@sunerpy
sunerpy deleted the feat/upstream-1.4.1-defer-h1-arkts branch July 14, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant