Skip to content

Remove the ace-server LSP client - #43

Open
bahbyega wants to merge 11 commits into
mainfrom
remove-lsp
Open

bahbyega wants to merge 11 commits into
mainfrom
remove-lsp

Conversation

@bahbyega

@bahbyega bahbyega commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Removes the ace-server (ArkTS language server) client: src/lsp/, the arkui-sem lsp command and the plugin's lsp setting. No rule used it, yet the plugin started it on the first .ets edit, costing minutes and GBs on a large project. The rules' cross-file facts come from the project index. Decision: decisions.md, "LSP client removed".

Comparison on CoolMall, an open-source HarmonyOS app (528 .ets files, 37.5k lines): 150 cross-file questions (struct call sites, imported-name declarations, property uses), median of 3 runs. The last column is the project after a DevEco sync:

project index (what the rules use) ohos-typescript checker ace-server (removed) ace-server (removed), synced project
Start 31 ms (lazy) 2.3 s 6.9 s 6.9 s
All 150 questions 5.9 s 1.2 s 11.1 s 14.5 s
Call sites of a struct, p95 / max 99 / 115 ms 14 / 21 ms 389 / 1,254 ms 425 / 1,116 ms
Peak memory 133 MB 460 MB 1,207 MB 1,275 MB
CPU 4.4 s 8.0 s 19.6 s 24.8 s
Imported names resolved (of 50) 40 13 13 50

The 10 imported names only the synced server resolves don't matter to the rules. Seven are project constants and a type alias (P100 = "100%", route tables, type Unknown = unknown), which the index doesn't look up: it resolves structs, classes, interfaces and builders. Three are declared in downloaded packages (two ORM decorators and a dropdown option type), which the index doesn't read. No rule asks about either.

Also carries the step-7 docs commits from the closed #42: the coverage plan moves to completed, and docs the new kinds left stale are fixed.

How it was checked

  • npm test and npm run lint in arkui-sem/ (offline). tsc --noUnusedLocals --noUnusedParameters, knip and a review pass found that only profileModules was used by the client alone, and it is removed.
  • Bench, heuristic backend: the agent-session replay and the noise check over the OpenHarmony, ArkEval and BitFun apps give the same findings as main, fingerprints included.
  • Plugin installed in sandbox/demo: one edit gives the usual finding, the load log has no lsp=, and no server process starts.

Notes for the reviewer

  • No migration, since there are no users yet: a config that still has "lsp" gets the existing unknown-key warning.
  • The parser still needs the SDK. sdk.ts now finds a DevEco install by its sdk/default/openharmony folder instead of its ace-server folder.
  • P-A4 (arkui-sem serving LSP diagnostics to the agent) is a different idea and stays on the roadmap. The roadmap's LSP spike phase is marked dropped, and its coverage table loses the LSP columns.

Move the coverage plan to completed with a Result (PR per step; the cleanup
step found nothing worth a refactor). The README, the AGENTS map, the plugin
diagram and core beliefs now name the list and input kinds and R4.
…er and the lsp setting

No rule asked the server anything; cross-file facts come from the project index.
@bahbyega
bahbyega requested a review from a team as a code owner November 27, 2026 12:26
@devnullexile-deepseek-review

devnullexile-deepseek-review Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit a10c746)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
✅ Merge recommendation: Needs review
🧪 PR contains tests
🔒 No security concerns identified
✅ Resolved findings

docs/design-docs/decisions.md:93-94

Doc/code mismatch

The "LSP client removed" decision says the SDK lookup still recognises a DevEco Studio install by its
ace-server folder, but this PR deletes that check: findStudio is gone, and studioSdk in
arkui-sem/src/sdk.ts now detects a studio by checking <studio>/sdk/default/openharmony (hasSdk).
Anyone reading the decision record to understand how the parser finds an SDK is told an ace-server
dependency remains, which the code no longer has. Update the sentence, or restore the ace-server check if
that detection was meant to stay.

@devnullexile-deepseek-review

devnullexile-deepseek-review Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

DeepSeek review: Not approved (a10c746)

To get the bot's approval:

  • changes to .github/workflows/test.yml need a human approval

Not blocking:

  • arkui-sem/test/opencode.test.ts:10 Test SDK isolation: This test no longer sets `ARKUI_SEM_SDK` to a stub, but the plugin's parser still calls `findSdk()`. With `ARKUI_SEM_SDK` unset, the new `studioSdk` in `arkui-sem/src/sdk.ts` now scans the default DevEco Studio install paths for `<studio>/sdk/default/openharmony`. On a machine with DevEco Studio in… (raised again on code the previous review already saw)

This comment is updated on every review. The review comment and its threads have the details.

@ArcsinX ArcsinX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code removal of src/lsp/, arkui-sem lsp, WarmLsp, lsp config, and profileModules looks clean and all CI checks (test (ubuntu-latest), test (windows-latest)) pass on 1b82948. Two minor issues left inline:

  1. findStudio in arkui-sem/src/sdk.ts still keys DevEco Studio detection off plugins/openharmony/ace-server even though findSdk is now its only caller.
  2. Several docs/descriptions remain stale despite the step-7 stale docs fixed entry in docs/exec-plans/completed/coverage-extensions.md.

Comment thread arkui-sem/src/sdk.ts Resolved
Comment thread docs/design-docs/decisions.md Resolved

@ArcsinX ArcsinX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed f54fc15 (and verified CI test / test (ubuntu-latest) / test (windows-latest) passed on f54fc15).

Both previous threads (sdk.ts DevEco detection and the stale arkui-sem/README.md / arkui_check / roadmap.md rule lists) have been addressed and resolved.

A few remaining issues from this pass are noted inline:

  1. docs/design-docs/decisions.md (and the PR description) still claims sdk.ts detects DevEco Studio via ace-server, which contradicts commit fd7d3e9.
  2. The rewritten findSdk in arkui-sem/src/sdk.ts has no unit test coverage after test/lsp.test.ts was deleted.
  3. Minor doc gaps remain in docs/exec-plans/active/roadmap.md (**Known limits:** and Status as of 2026-11-10) and ARCHITECTURE.md (test/ file list).

Comment thread docs/design-docs/decisions.md Resolved
Comment thread arkui-sem/src/sdk.ts Resolved
Comment thread docs/exec-plans/active/roadmap.md Resolved
Comment thread ARCHITECTURE.md Resolved
Comment thread arkui-sem/test/opencode.test.ts Resolved

@ArcsinX ArcsinX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed a10c746 (and verified CI test, test (ubuntu-latest), and test (windows-latest) passed on a10c746).

The three documentation threads (docs/design-docs/decisions.md, docs/exec-plans/active/roadmap.md, and ARCHITECTURE.md) have been addressed and resolved.

One earlier inline comment remains unaddressed:

  • arkui-sem/src/sdk.ts (lines 24–30): the rewritten findSdk (studioSdk / hasSdk) still has no offline unit tests after test/lsp.test.ts was deleted.

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.

2 participants