SolidLanguageServer.create previously defaulted timeout=None, so Request
waits were unbounded. Test construction never set a timeout; a wedged
language server (intermittent ccls hang during indexing) could stall CI
until the job cap.
Default create to DEFAULT_LS_REQUEST_TIMEOUT (300s). Explicit timeout=None
still opts out. Project continues to pass ls_timeout from tool_timeout.
Resolves#1717
Co-authored-by: Dominik Jain <dominik.jain@oraios-ai.de>
The tray manager creates the shared NSApplication so that pystray can
attach its status item to it, but it never sets an activation policy.
The default is NSApplicationActivationPolicyRegular, which makes the
process a regular app: a Python icon appears in the Dock and in the
app switcher even though the tray manager has no windows.
Set NSApplicationActivationPolicyAccessory instead, which is the
policy intended for menu-bar-only agents. Only the status item remains
visible.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Tools that explicitly target a single file (`create_text_file`, `read_file`, `replace_content`) no longer
consider ignored paths in general, i.e. all files can be accessed.
When a path is explicitly accessed, we should not try to prevent it; the agent is assumed to have a good reason
for doing so.
- Tools that traverse a subtree of the project (`list_dir`, `find_file`, `search_for_pattern`) now all have an
option `skip_ignored_files` (whether to skip ignored sub-paths).
Note that if the base path is itself ignored, ignored paths cannot be considered.
Resolves#1805
`workspace/inlayHints/refresh` (plural) is not a method in the LSP
specification — the refresh request is `workspace/inlayHint/refresh`.
The handler could therefore never be invoked, so the request it was
meant to absorb would still be answered with `MethodNotFound`.
The Kotlin language server client advertises `refreshSupport` for
codeLens, semanticTokens, inlineValue, inlayHint and diagnostics, but
registered no handler for the corresponding `workspace/*/refresh`
requests.
When the server sends one, `LanguageServerProcess._request_handler`
finds no handler and replies with `MethodNotFound`. The Kotlin LSP
treats that error as fatal and terminates, which surfaces as
`LanguageServerTerminatedException` and kills any in-flight tool call.
Register no-op handlers for all five advertised capabilities, mirroring
what `svelte_language_server` already does.
Erlang LS identifies functions, types and parameterised macros as
`name/arity`, but `/` separates the components of a Serena name path, so
`create_user/4` was parsed as "symbol `4` nested inside `create_user`" and
could never match -- not even via the name path Serena itself reported for
the symbol. Browsing still worked, but find_referencing_symbols,
replace_symbol_body and insert_after_symbol were unusable on Erlang
functions.
Normalize the name to `create_user#4` instead. `#` cannot occur in an
unquoted Erlang atom, so it can never collide with a real name, unlike `@`.
The arity is kept rather than stripped because it is part of a function's
identity in Erlang: create_order/3 and create_order/2 are different
functions and may coexist in one module.
Also document the "no `/` in symbol names" rule on _normalize_symbol_name,
which is what the next backend for such a language needs to know.
* Add DownloadedDependency abstraction to facilitate handling of downloaded
and hash-verified dependencies.
In CI, missing hashes raise an exception.
For users, unverified downloads log a warning.
* Add DownloadedDependencyHashDatabase which manages a URL-keyed database
of sha256 hashes. It can be conveniently updated incrementally through a
script (src/solidlsp/resources/downloaded_dependency_hashes.json),
provided that language server implementations provide DownloadedDependency
instances statically
Applied in EclipseJDTLS:
* Replace the untyped nested-dict runtime dependency descriptors with DownloadedDependency instances
* Move the JDTLS version-pinning constants into DependencyProvider
* Replace the platform dependency dicts with the VSCodeJavaConfig dataclass
Utils:
* Add FileUtils.ArchiveType to type archive types that were previously plain str
* Add is_running_in_ci() to ls_utils
Updated memory on adding a language server accordingly.
Instead of sending only the didOpen notification if the file is not already open,
the method now ensures that the language server has the (current) contents of the file,
sending the didChange notification in cases where the file is already open but has changed
on disk. This better reflects the actual intention of calling the method.
This affects the Vue and Svelte language servers, which unlike all other server implementations,
kept files open, which could result in the servers reporting stale information in the
absence of update notifications (external file changes).
request_text_document_diagnostics swallowed all SolidLSPException from
textDocument/diagnostic and fell back to published diagnostics. When the
process had already died, that bypassed tools_base restart-and-retry and
silently returned empty diagnostics.
Re-raise when is_language_server_terminated(); keep the published-
diagnostics fallback for other pull-diagnostics failures.
Fixes#1770
ErlangLanguageServer was left behind when the initialize-params refactor
moved server-specific capabilities into _create_base_initialize_params.
It still built its initialize dict inline in _start_server, so the class
never satisfied the abstract method declared on SolidLanguageServer and
could not be instantiated at all:
Can't instantiate abstract class ErlangLanguageServer without an
implementation for abstract method '_create_base_initialize_params'
Move the capabilities block into the required method, following the
pattern used by the other backends, and let _start_server build its
params via _create_initialize_params(). processId/rootPath/rootUri are
dropped from the literal since the builder supplies them.
The test suite runs on a single interpreter, so nothing covered the rest of the range declared by
`requires-python` (>=3.11, <3.15). The new workflow installs the locked dependency set on each of 3.11-3.14
and then runs `project health-check` against the Python test repo, which catches both a dependency without a
wheel for a given version and any import or startup breakage. It is deliberately Linux-only, to stay within
the cap of 20 concurrent jobs, and deliberately does not cache the venv, since a restored venv would make the
`uv sync` under test a no-op.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The failure paths either returned normally or were swallowed by the catch-all exception handler, so callers
(CI, scripts) could not act on the command's verdict. Failures now raise, and the verdict is reported outside
the checked region -- where a failure to write the report can no longer be mistaken for a failure of the check
itself -- and signalled through the exit code. A FindSymbolTool result without any matches is treated as a
failure rather than a warning.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
FsAutoComplete reports selectionRange for a `module <Name>` declaration
pointing at the `module` keyword itself, not at `<Name>`. Since
LanguageServerSymbol.line/.column (src/serena/symbol.py) build hover and
reference lookups from selectionRange.start, hovering a module returns
the LSP server's docs for the generic keyword instead of the module's
own, as reported in #925 by the F# team and confirmed by dsyme
(F# tooling) and MischaPanch in the issue thread.
This mirrors the fix already shipped for fortls in
fortran_language_server.py: a request_document_symbols override that
recovers the real identifier column by matching the declaration line
with a regex, scoped to Module symbols only since other kinds (functions,
types, open) already select correctly.
Verified with a synthetic-payload unit test (module declaration,
nested-with-equals, recursive module, an already-correct range left
untouched, and a non-Module symbol left untouched), since F# language
server tests are unconditionally disabled in this repo
(test/conftest.py: "F# language server is currently unreliable"), so no
live-FsAutoComplete regression test can run here or on CI. Confirmed the
new test fails on main (AttributeError / unfixed selectionRange) and
passes on this branch.
Fixes#925
SerenaAgent now tracks an initial/startup project activation error and appends it
to the system prompt, instead of the failure being visible only in the log.
This applies both to a failed activation of an explicitly given project and to a
failed --project-from-cwd auto-detection.
Also fix the --project-from-cwd help text, which falsely promised a fallback to the CWD
Resolves#1773
serena's symbol tools (find_symbol, find_referencing_symbols, …) only need the
symbol index, but the LSP is launched with VS Code's full heavyweight defaults.
On a large, actively-built Rust workspace these drove rust-analyzer to 40+ GB
RSS and triggered a full re-index on every external `cargo build` (target/
churn). Disabling the two eager/auto re-indexing drivers keeps symbol
navigation working at a fraction of the memory:
- cachePriming.enable: True -> False (no eager whole-workspace+deps index)
- cargo.autoreload: True -> False (no re-index storm on target/ changes)
checkOnSave is intentionally LEFT enabled: serena's get_diagnostics_for_file
relies on flycheck (`cargo check`) for Rust diagnostics, and disabling it makes
that tool return empty (test/solidlsp/rust/test_rust_diagnostics.py fails with
[]). checkOnSave only spawns transient `cargo check` child processes and is not
a driver of rust-analyzer's resident RSS, so keeping it on preserves
diagnostics at no meaningful memory cost.
Observed on a rustback (multi-crate + rustic_core fork) workspace: repeated
40-44 GB rust-analyzer processes under serena with no VS Code present. Suggest
upstream expose a "lightweight"/symbol-only RA profile or a config toggle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit e09b9b623e321f72e64b6ba3de6708ff519f524f)
`ansible-language-server` doesn't implement `textDocument/documentSymbol`
and the request used to map diagnostics onto owning symbols just threw. `AnsibleLanguageServer` now
overrides that request to return `None` directly, so diagnostics fall back to being grouped under
the file-level path #1758
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>