Local IntelliSense - #400
Draft
isc-klu wants to merge 126 commits into
Draft
Conversation
Co-authored-by: Copilot <copilot@github.com>
Collaborator
Author
|
The previous commit implements "go to definition" for classes and class members. |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
isc-klu
marked this pull request as ready for review
April 24, 2026 14:53
ascot dropped hover-type/hover-member/macro-expansion from its WIT surface in favor of one merged hover method; this script's jco async-exports list still named the old one.
Inline single-use thin wrappers (getCoreModule, loadAscot, convertDiagnostic, rowToMemberInfo) instead of naming them separately; move convertSymbolInfo and prettifyNormalArg to their only callers (getDocumentSymbol, signatureHelp.ts); drop the includeExtends param that was always true and the export on getClass that had no external caller; replace a truthy-Promise && || trick in filePathToWorkspace with folder?.uri ?? docURI; remove dead workspace?. optional chaining now that workspace resolution never returns undefined. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
isc-klu
marked this pull request as ready for review
September 1, 2026 02:23
isc-klu
marked this pull request as draft
September 2, 2026 14:55
Wire up getInclude on IrisConnection (async, REST-backed, same cache pattern as getMem/getSupers/isDatatype), add the new "module" SymbolKind, fix DocumentSymbol's renamed root field, and drop the ascot prefix from document/workspace symbol names.
Replaces the manual "copy ascot.wasm, run jco transpile locally" step with a normal dependency on @intersystems-community/ascot, which ships the componentized/transpiled glue and a serialized Workspace API already built. webpack still bundles the package's JS into server/out/, so its wasm files need mirroring into server/lib/ (same pattern already used for isclexer.node) -- added a postinstall script for that.
A postinstall hook can silently not run (npm ci --ignore-scripts, corporate install policies, etc.), which would ship a build missing the wasm files with no build-time signal. Doing the copy in server/webpack.config.js ties it to the one step that always has to run before packaging.
WIT is an implementation detail of how ascot itself is built now that it's a real npm package, not something this file's readers need to know about.
Leftover from when the local type was called WorkspaceInstance -- nothing else in this file uses the bare name Workspace, so there's no collision to alias around.
createWorkspace/Workspace/Imported were named imports alongside a separate type-only `* as Ascot` import of the same module -- no real reason for the split, so collapse to one `import * as Ascot` and prefix those three too.
Drop the blanket `import * as Ascot` -- explicit named imports read better without a prefix on every use. Four names collide with vscode-languageserver's own enums or this file's own re-exports (DiagnosticSeverity, SymbolKind, MemberInfo, NormalArg), so those four keep an "Ascot"-prefixed alias; nothing else needs one.
…cot" This reverts commit f4aee2e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, this language server retrieves most of its information from IRIS servers, including data that is already available locally—such as class names and method arguments of client-side class documents. This design requires frequent data transfer between the language server and IRIS, may not always reflect the latest state, and becomes unusable when IRIS servers are unavailable.
This PR is a step toward improving existing IntelliSense capabilities and enabling new ones by extracting information directly from local class documents (*.cls, *.mac, *.int, *.inc), via ascot, a WebAssembly component (loaded through
jco) that indexes the workspace and answers queries via a WIT-definedWorkspaceinterface.Existing capabilities now backed by ascot first, falling back to the existing REST-based implementation when it has no answer:
Diagnostics: ascot's checker catches substantially more than the previous implementation, which was limited to syntactic errors.
Brand new capabilities, provided entirely by ascot: