Make the Svelte companion TypeScript server raise on readiness and
indexing timeouts instead of silently proceeding with a partial index,
turning flaky/wrong cross-file results into clear failures:
- TypeScriptLanguageServer: timeout handling factored into overridable
hooks (_handle_server_ready_timeout, _handle_project_indexing_timeout);
the base server keeps its historical permissive behavior, so plain
TypeScript setups are unchanged.
- SvelteTypeScriptServer: both overrides raise TimeoutError; only the
indexing-timeout error includes describe_indexing_state(), instead of
serving requests from a cold or partially indexed program.
- Configurable server_ready_timeout / indexing_timeout via
ls_specific_settings.
- SvelteLanguageServer: file-open failures during companion preparation
raise SvelteCompanionPreparationError with a count-first file listing
(capped at 10), chained to the first underlying error so the cause is
visible without DEBUG logging.
Apply the same fail-loudly principle to the test fixture bootstrap:
- Svelte test repo: npm ci with a committed package-lock.json, removing
dependency-resolution non-determinism from CI runs.
- Run svelte-kit sync explicitly during fixture setup and fail loudly if
.svelte-kit/tsconfig.json cannot be generated. The fixture's "prepare"
script masks sync failures ("svelte-kit sync || echo ''"), and a known
npm bug (npm/cli#4828) can silently skip platform-specific optional
dependencies; the result is unresolvable $lib path aliases and
cross-file tests failing with partial results instead of a clear,
actionable error.
- codespell: skip third-party fixture repositories, using the anchored
pattern ./test/resources/repos (codespell matches skip globs against
the ./-prefixed paths it walks, so an anchor-less pattern never
matches).
Also add direct regression tests for the timeout-policy split
(test/solidlsp/test_typescript_timeout_policy.py: base stays
permissive, companion raises, settings plumbing and precedence, and
start-or-completion indexing-wait semantics). The tests use no mocking or
patching of any kind; a hand-written call-recording fake drives the companion
guard against real file discovery under a pytest tmp_path. They spawn no LS
process and avoid external readiness races; one wait test uses a real Timer
with a 30s ceiling.
The configuration docs state that the TypeScript table lists both knobs; the
Svelte table lists indexing_timeout, with readiness inheritance documented in
prose.
EclipseJDTLS.is_ignored_dirname hard-ignored directories named target/build/bin/out/classes/dist/lib. Several of these (dist, lib, classes, out) are valid Java package identifiers, so any source file whose package path contained one was dropped from directory traversal and became invisible to the symbol tools (find_symbol, get_symbols_overview, find_referencing_symbols) even when git check-ignore reported nothing.
Per maintainer guidance in #1645, remove the override entirely: the base is_ignored_dirname already skips _ALWAYS_IGNORED_DIRS (VCS/venv/cache/IDE internals), and real build output is already excluded via .gitignore, so the hardcoded list was both redundant and harmful.
Adds a regression test (no Java/JDTLS process required) that fails on main and asserts the formerly-hardcoded names are no longer ignored while _ALWAYS_IGNORED_DIRS still are.
Without --locked, cargo install freshly resolves shader-sense ^1.3.1,
which since 2026-07-04 picks shader-sense 1.4.0. That release removed
the public field GlslCompilationParams.preamble (split into
preamble_path/preamble_content), which shader_language_server 1.3.1's
server_config.rs still constructs, so the from-source build fails with
E0560 and cargo exits 101. macOS is the only platform that builds the
server from source (Linux/Windows download prebuilt release binaries),
so only the macOS CI jobs fail: all 15 test/solidlsp/hlsl fixtures
error at setup (run 28726267725, job 85184119276).
--locked makes cargo honor the Cargo.lock packaged with the published
crate, which pins shader-sense 1.3.1 - the dependency set the 1.3.1
release was built and tested from - and immunizes the build against
future lockstep releases of the two crates. Verified locally: the
unlocked build reproduces the exact E0560/exit-101 failure; the locked
build compiles cleanly and yields a working binary reporting v1.3.1.
Also adds --locked to the manual-install help text, matching the
existing convention in taplo_server.py.
The AngularLanguageServer, SvelteLanguageServer and VueLanguageServer
classes (the primary ngserver/svelte-language-server/vue-language-server
processes, all direct SolidLanguageServer subclasses) still hand-rolled
their initialize params via _get_initialize_params, bypassing the builder.
Only their companion *TypeScript* server classes (AngularTypeScriptServer,
etc.) had been migrated previously.
Convert the three main classes to _create_base_initialize_params so their
processId/rootPath/rootUri/clientInfo/workspaceFolders are now supplied
centrally by the InitializeParamsBuilder, consistent with every other
language server. Server-specific initializationOptions (ngProbeLocations,
svelte plugin configuration, Vue hybridMode) are preserved.
Also update the Angular companion-cleanup test to monkeypatch the renamed
_create_base_initialize_params (it patched the now-removed
_get_initialize_params).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* TypeScript/VTS: event-based indexing wait, no automatic typing acquisition
- Set disableAutomaticTypingAcquisition in initializationOptions (TS and VTS)
so tsserver does not download type packages from the network during
language server initialization.
- Replace the fixed 2-second wait before cross-file reference requests with
$/progress-based indexing tracking: a pre-open hook arms the tracking
(expect_indexing) before didOpen, then the request waits until indexing
progress drains (wait_for_indexing), bounded by a configurable
'indexing_timeout' (ls_specific_settings, default 30s). If tsserver does
not start reporting progress within a 2-second grace period (the previous
fixed wait), the request proceeds — so the fast path is never slower than
before, while slow indexing is actually awaited instead of guessed at.
Document the new LSP initialization pattern in the "adding new language
support" memory: override _create_base_initialize_params (server-specific
keys only), let the InitializeParamsBuilder supply the common keys, and call
_create_initialize_params() in _start_server. Includes notes on
builder-resolved workspace folders, nested initializationOptions folder
lists, and opting out via set_workspace_folders=False.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert every remaining SolidLanguageServer subclass from the old
_get_initialize_params method to the new _create_base_initialize_params
override, so common LSP initialize keys (processId, rootPath, rootUri,
clientInfo, workspaceFolders) are provided centrally by the
InitializeParamsBuilder rather than by each server.
- Drop the per-server processId/rootPath/rootUri/workspaceFolders and all
clientInfo entries (including the VS Code spoofs in rust_analyzer and
sourcekit); these are now set centrally.
- Preserve nested capabilities.workspace.workspaceFolders flags and any
server-specific initializationOptions.workspaceFolders (e.g. kotlin,
eclipse_jdtls).
- omnisharp keeps loading its JSON template but no longer sets the
centrally-managed keys.
- Update _start_server call sites to self._create_initialize_params() and
drop now-unnecessary cast()/type: ignore wrappers.
angular, svelte and vue are intentionally left as-is: they already override
_create_base_initialize_params for their TypeScript companion server, and
their remaining _get_initialize_params drives a separate language server
process.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
that use the newly introduced InitializeParamsBuilder
- Add new configuration option `ls_workspace_folders` to allow indexed source folders to be specified
explicitly. In monorepos, this allows the set of indexed folders to be restricted to a subset of
the repository. #1627
- Rename configuration option `additional_workspace_folders` to `ls_additional_workspace_folders`
and support the option across all language servers that use an InitializeParamsBuilder
(previously limited strictly to the TypeScript server).
Moved the option from SolidLSPSettings to LanguageServerConfig, where it belongs.
Apply InitializeParamsBuilder in TypeScriptLanguageServer and its subclasses.
which sets common settings centrally:
- processId
- rootPath
- rootUri
- clientInfo
- workspaceFolders
Apply builder in SolidLanguageServer, adding new abstract method
_create_base_initialize_params to be implemented by subclasses.
Applied in PyrightServer.
determine_programming_language_composition computed percentages over the total
file count, so files belonging to no supported language (images, plain text,
licenses, lock files) diluted the numbers — a repository with 2 Python files
and 23 assets reported Python at 8%. Percentages are now relative to files
matching at least one supported language, and the counting runs in a single
pass over the file list instead of one pass per language.
The only consumer (ProjectConfig.autogenerate) sorts languages by percentage,
which is unaffected by the uniform rescaling.
ls_base_cmd allows the user to override the base command with a
multi-element command (e.g. ["npx", "-y", "/my/local/package"]),
generalising ls_path, which it takes precedence over.
Generalises launch command creation from a base command which
the user can override via custom settings.
SinglePath and Uvx dependency providers are now specialisations of it;
the uvx command construction was moved from common.py into the Uvx provider.
The language support guide memory is updated accordingly.
Wrap os.scandir() with PermissionError guard in _iter_gitignore_files'
scan() function to prevent crash when a subdirectory is not readable.
Previously, PermissionError on the scandir call itself crashed the
entire gitignore walker, even when the path was listed in ignored_paths.
Fixesoraios/serena#1624
Co-authored-by: Claude <noreply@anthropic.com>
Add activation_command to project config
Adds two optional fields to ProjectConfig:
- activation_command: shell command run in the project root before the
language backend (LSP or JetBrains) initialises
- activation_command_timeout: safety backstop (default 180s); on expiry
the process tree is killed and activation continues
The command is only executed for trusted projects (trusted_project_path_patterns).
Exit code is the primary completion signal; failures and timeouts are logged
but never abort activation (no return channel to the LLM at that point).
Closes#1606
---------
Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
* Introduce abstractions: FileCollection, FileProxy
* Unify handling of pattern search in project files
(source code vs. all files)
This prepares for processing of external files,
which can implement FileProxy differently.
A plain truncate-and-write (open(path,"w")) is not atomic: a concurrent writer
(a second Serena process updating the auto-managed registered-projects list) or an
interrupted write can leave the file half-overwritten -- a shorter value over a longer
one leaves a stale tail, corrupting the YAML so every later load fails. This is what
wedged native benchmark runs (serena MCP crashed at startup with a ruamel ScannerError
-> 0 tools registered -> agent silently degraded to Bash).
Write to a temp file in the same dir, then os.replace onto the target (atomic;
last-writer-wins, never a corrupt interleave). Retry os.replace on Windows
PermissionError (WinError 5/32 sharing violation under contention). Adds
test/serena/util/test_yaml.py covering the shorter-over-longer corruption signature
plus a concurrent-writers stress.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>