|
1 | 1 | # CHANGELOG |
2 | 2 |
|
| 3 | +## v0.2.0 |
| 4 | + |
| 5 | +Adds most remaining LSP requests to `BenchContext`, server-aware save handling, answers for common server to client requests, and a second integration suite against Langium's grammar language server. |
| 6 | + |
| 7 | +### New BenchContext methods |
| 8 | + |
| 9 | +- **Navigation:** `declaration`, `documentHighlight`, `prepareRename` |
| 10 | +- **Formatting:** `rangeFormatting`, `onTypeFormatting` |
| 11 | +- **Document structure:** `foldingRange`, `selectionRange`, `documentLink`, `codeLens`, `inlayHint` |
| 12 | +- **Semantic tokens:** `semanticTokensFull`, `semanticTokensRange`, `semanticTokensDelta` |
| 13 | +- **Workspace symbols:** `workspaceSymbol` |
| 14 | +- **Call/type hierarchy:** `prepareCallHierarchy`, `callHierarchyIncomingCalls`, `callHierarchyOutgoingCalls`, `prepareTypeHierarchy`, `typeHierarchySupertypes`, `typeHierarchySubtypes` |
| 15 | +- **Pull diagnostics:** `documentDiagnostic`, `workspaceDiagnostic`. The `textDocument.diagnostic` client capability is intentionally not advertised, since some servers switch from push to pull diagnostics when it is present, which would break `waitForDiagnostics`. |
| 16 | +- **Resolve:** `completionItemResolve`, `codeActionResolve`, `codeLensResolve`, `inlayHintResolve`, `documentLinkResolve`, `workspaceSymbolResolve` |
| 17 | +- **Document lifecycle:** `saveDocument`, `willSave`, `willSaveWaitUntil` (timed) |
| 18 | + |
| 19 | +### Save handling |
| 20 | + |
| 21 | +- Save related sync options are read from the static `textDocumentSync` capability and from dynamic registrations of `textDocument/didSave`, `textDocument/willSave` and `textDocument/willSaveWaitUntil`. A bare `TextDocumentSyncKind` number implies `didSave` without text, matching `vscode-languageclient`. They are available via `LspHarness.saveSyncOptions()`, and `SaveSyncOptions` is exported. |
| 22 | +- `saveDocument` only sends `didSave` when the server wants it, and includes the current document text when it asks for `includeText`. `willSave` is also only sent when wanted, while `willSaveWaitUntil` is always sent since it is timed. |
| 23 | + |
| 24 | +### Server to client requests |
| 25 | + |
| 26 | +- Refresh requests (`workspace/semanticTokens/refresh`, `inlayHint/refresh`, `codeLens/refresh`, `inlineValue/refresh`, `diagnostic/refresh`) and `window/workDoneProgress/create` are acknowledged. |
| 27 | +- `window/showMessageRequest` is dismissed with `null`, and `workspace/applyEdit` is declined with `applied: false`. |
| 28 | +- `client/unregisterCapability` is now handled. |
| 29 | + |
| 30 | +Previously these were rejected with a JSON-RPC `MethodNotFound` error, which some servers log noisily or handle poorly. |
| 31 | + |
| 32 | +### Client capabilities |
| 33 | + |
| 34 | +- Advertises capabilities for every new request, including `codeAction` `dataSupport` and `resolveSupport`, `inlayHint` and workspace symbol `resolveSupport`, semantic token requests (full, delta, range), and `linkSupport` for declaration. |
| 35 | + |
| 36 | +### Behavior changes |
| 37 | + |
| 38 | +- `saveDocument` now respects the server's save options, so it may send nothing, or send `didSave` with the full text, where it always sent a bare `didSave` before. |
| 39 | +- `codeAction` and `inlayHint` `resolveSupport` and workspace symbol `resolveSupport` are now advertised, so some servers may return partial items and defer work to the matching resolve request. Benchmarks of those requests may get faster, with the cost moving to resolve. |
| 40 | + |
| 41 | +### Fixes |
| 42 | + |
| 43 | +- `stop()` never force killed a server that ignored `SIGTERM`, since it checked `process.killed` (which only reports that a signal was sent). It now checks for an actual exit and sends `SIGKILL` after 3 seconds. |
| 44 | +- `edit` now applies each edit to the locally tracked document text, in order, following LSP incremental `didChange` semantics. Previously the tracked text never changed after `openDocument`. |
| 45 | +- `codeAction` diagnostic code filtering now also matches `data.code`, so quick fixes from servers like Langium that store their issue code in `data` can be triggered. |
| 46 | +- `addRegisteredLanguage` stored the extension mapping backwards (language id to extension instead of extension to language id). Extensions are now also lowercased to match `detectLanguageId`. |
| 47 | +- `BenchContext.workspaceRoot` is documented as the absolute workspace path it actually holds, not a URI. |
| 48 | + |
| 49 | +### Docs and tests |
| 50 | + |
| 51 | +- README and `lsbench prime` list the full API grouped by area, describe save sync and server to client handling, and correct the stale CLI options and server configuration sections (a JSON server config file was documented but never supported, use `--init-options-file` instead). |
| 52 | +- New integration suite against Langium's grammar language server (from devDependencies), covering formatting, code actions, semantic tokens, call and type hierarchy, and more. The minilogo suite now covers the additional methods it supports, and both suites list unsupported methods as skipped. |
| 53 | +- `examples/typescript-actions.ts` showcases the new methods. |
| 54 | + |
3 | 55 | ## v0.1.0 |
4 | 56 |
|
5 | 57 | First release! |
|
0 commit comments