Invocation, options and results
링크topaz lsp
topaz lsp
입력
Use topaz lsp without a positional operand. The accepted options are - or -, -, -, -, - and -. The compiler defaults to self for the current language profile.
Memory and time budgets are positive decimal integers. Explicit options override TOPAZ_ and TOPAZ_. The defaults are 8192 MiB and 1800000 ms. Reject missing values, zero budgets, malformed numbers, unsupported language profiles, repeated options, equals forms and all unlisted options before starting the session.
initialize. selects a local workspace when supplied. The CLI root is the initial workspace and the fallback when initialization supplies no local root. Bind the compiler to the admitted workspace language profile. An explicitly selected compiler that cannot serve that profile fails without silently choosing another compiler.
옵션과 충돌
| 옵션 | 기본값 | 계약 | 충돌 |
|---|---|---|---|
--compiler rust|self | self | compiler selector (default self); rust selects the reference compiler Also rejects combination with --producer, --self-source. | 없음 |
--verbose | false | Reports the selected compiler and whether it was explicit or the default. For | 없음 |
--root <dir> | 미지정 | run the deterministic stdio language server; package diagnostics use initialize.rootUri (or --root) with a valid locked package and open-document overlays | 없음 |
--language-version <5.21> | 5.21 | language version selector | 없음 |
--compiler-memory-mib <MiB> | 8192 | self compiler worker memory budget (8192); overrides TOPAZ_COMPILER_MEMORY_MIB A positive integer is required. Environment input: TOPAZ_COMPILER_MEMORY_MIB. | 없음 |
--compiler-time-ms <ms> | 1800000 | self compilation wall-clock budget (1800000); overrides TOPAZ_COMPILER_TIME_MS A positive integer is required. Environment input: TOPAZ_COMPILER_TIME_MS. | 없음 |
출력 채널
stdout
stderr
종료 상태
0
The client ends the session with an exit notification or clean end of input between messages.
1
Startup arguments, locked workspace state, compiler selection, worker startup, transport framing or session input or output fails.
효과
Read the selected local source tree and its already materialized dependencies. Open document content replaces the corresponding disk content only in the session snapshot.
Keep edits and proposed renames in protocol responses. Do not write the source tree, manifest, lock file or vendored files. Any compiler worker storage is private temporary state and is reclaimed when the session ends.
Only a local file root participates in package loading. A root URI that cannot denote a local directory leaves the CLI root fallback in effect and grants no remote filesystem access.
Use standard input and standard output for transport. Do not open a listening socket, contact a registry, download a compiler or fetch imports.
The same installed toolchain, selected compiler, language profile, workspace bytes, valid lock, document overlay sequence and request sequence produce the same semantic responses and diagnostic ordering.
Protocol identifiers are copied from requests. Client scheduling and resource timeout outcomes are outside a byte comparison unless the request order, budgets and termination conditions are also fixed.
A workspace containing topaz. uses its package graph and a valid topaz. for package diagnostics. Missing, stale or invalid locked dependencies are errors and are not repaired by the server.
Read dependency entries in the table form required by the package contract. A standalone document without a package is checked as a standalone source snapshot. The server never runs lock, add or vendor.
Operation
링크The language server uses the initialized workspace root or the selected package root for package diagnostics. Open documents supply source overlays.
Option conditions
링크- cannot be combined with bootstrap - or -
Behavior contract
링크Command behavior
Arguments and rejection
Use topaz lsp without a positional operand. The accepted options are - or -, -, -, -, - and -. The compiler defaults to self for the current language profile.
Memory and time budgets are positive decimal integers. Explicit options override TOPAZ_ and TOPAZ_. The defaults are 8192 MiB and 1800000 ms. Reject missing values, zero budgets, malformed numbers, unsupported language profiles, repeated options, equals forms and all unlisted options before starting the session.
initialize. selects a local workspace when supplied. The CLI root is the initial workspace and the fallback when initialization supplies no local root. Bind the compiler to the admitted workspace language profile. An explicitly selected compiler that cannot serve that profile fails without silently choosing another compiler.
Output
Standard output contains only LSP messages. Each message has a Content- header, a blank line and the indicated number of UTF-8 JSON bytes. JSON-RPC response identifiers match their requests. Diagnostics use protocol notifications and do not become a human stdout banner.
Human startup and transport errors use standard error. - reports the resolved compiler and selection origin on standard error. There is no separate human or selectable JSON report mode. Reject both - and - as unsupported startup options.
Initialization describes the supported editor capabilities. Request failures use protocol error responses when a response can be sent. Program diagnostics in a valid response do not by themselves terminate the server.
Exit status
Exit 0 when the client ends the session with an exit notification or clean end of input between messages.
Exit 1 for invalid startup arguments, invalid locked workspace state, an unavailable selected compiler, failure to start a compiler worker, malformed or truncated transport framing, or failure to read or write the session stream. No response for an unfinished request is presented as a successful result.
Filesystem effects
Read the selected local source tree and its already materialized dependencies. Open document content replaces the corresponding disk content only in the session snapshot.
Keep edits and proposed renames in protocol responses. Do not write the source tree, manifest, lock file or vendored files. Any compiler worker storage is private temporary state and is reclaimed when the session ends.
Only a local file root participates in package loading. A root URI that cannot denote a local directory leaves the CLI root fallback in effect and grants no remote filesystem access.
Network access
Use standard input and standard output for transport. Do not open a listening socket, contact a registry, download a compiler or fetch imports.
Reproducibility
The same installed toolchain, selected compiler, language profile, workspace bytes, valid lock, document overlay sequence and request sequence produce the same semantic responses and diagnostic ordering.
Protocol identifiers are copied from requests. Client scheduling and resource timeout outcomes are outside a byte comparison unless the request order, budgets and termination conditions are also fixed.
Packages and locks
A workspace containing topaz. uses its package graph and a valid topaz. for package diagnostics. Missing, stale or invalid locked dependencies are errors and are not repaired by the server.
Read dependency entries in the table form required by the package contract. A standalone document without a package is checked as a standalone source snapshot. The server never runs lock, add or vendor.
이유
Editor requests and diagnostic responses belong to a framed protocol. Keeping logs on standard error prevents a human message from corrupting that protocol. Open document overlays express unsaved editor state and must not become filesystem writes.
The linked public CLI recipe checks the exact displayed argument rejection before the requested operation. It does not execute the successful operation or verify its effects.
The reviewed recipe supplies a forbidden source operand and only checks startup rejection. A framed initialized editor session and its overlay effects are outside the execution allowlist.
Example contract
링크Example contract
The invocation topaz lsp main. is expected to exit with 1.
The command has no positional source operand. The adapter-supplied fixture operand is deliberately rejected before its operation; this is an arity example, not a successful lsp session.
이유
lsp receives documents and workspace information through the editor protocol. Rejecting a source operand prevents it from being silently ignored.
Example
링크Argument-rejection example
링크function identity<T>(value: T) -> T {value}
기대 결과
기대 결과
Textual rejection details remain Pending in the reference model. The independent Tools example gate expects exit 1.
The command has no positional source operand. The adapter-supplied fixture operand is deliberately rejected before its operation; this is an arity example, not a successful lsp session.
Verification scope
링크Observed with Topaz 5.21.3 on 2026-11-06T08:36:29.642Z. This invocation passed; exit 1. 3 assertions were evaluated against the independent expected result. Execution record. This result covers the displayed invocation.