Файли
openidea/crates/ide-plugin/tests/fixtures/indexer
Ainul YaqinтаAkin01 ed6f264875 fix(plugins): provide lossless bounded streaming and configurable capture for processes (#4812)
Plugins running compilers, linters or large diffs lost output: `start` kept only a 1 MiB tail and `run`/`run-command` truncated stderr. API 1.15 adds `process-options` (`max-output-bytes` up to 128 MiB, `buffer-bytes` up to 4 MiB), `run-captured`, which fails explicitly when either stream overflows, and `start-stream`, which streams losslessly with pipe backpressure: readers pause at the buffer limit, resume as `poll`/`chunk` consume, and `wait` drains up to the total limit so fast producers don't deadlock. Overflow stops the process tree and records its exit status before reaping it. `run`, `run-command` and `start` behave as before, and 1.14 components still load.

Closes #4763

Co-authored-by: Akin01 <[email protected]>
2026-11-22 14:11:13 +08:00
..

Document indexer test fixture

A small line-oriented test language (.idx), unrelated to any framework: def key, ref key, alias prefix# target# and symbols prefix. References also produce gutter markers. symbols uses host-supplied UTF-16 syntax ranges. invalid key deliberately returns an out-of-bounds range.

Used by cargo test -p ide-host --test plugin_indexing to exercise the optional WIT export, lifecycle invalidation, permissions, per-window isolation, candidate selection and warm memory-only lookups. It is not a marketplace plugin.

The fixture requires project.read. Its API 1.2 manifest is retained to check compatibility; Find Usages and Rename consume the same anchors on API 1.3 hosts.

Build with plugins/build.sh crates/ide-plugin/tests/fixtures/indexer, then load this directory as a development plugin in a trusted scratch project containing:

# definition.idx
def route
ref route

# usage.idx
ref route

The filenames and comment lines above describe two separate files. Invoke Find Usages on either route anchor: three locations should appear. Rename route to new.route: the preview must contain all three anchors. Cancel leaves both files unchanged; applying changes both files, and one Undo restores both.

Run cargo test -p ide-host --test plugin_indexing --test plugin_refactoring for the real Wasm graph and preview/apply/undo checks, including UTF-16 names, aliases, duplicate anchors and stale files.