Commit Graph
2214 Commits
Author SHA1 Message Date
Dominik Jain 15ab4e7747 Move test_utils to util package 2026-02-24 11:29:06 +01:00
Dominik Jain 1e89449f40 Improve description of 'symbol_info_budget' 2026-02-23 21:43:39 +01:00
Michael Panchenko a0d2ed99fb Docstring: highlighted possibility to analyze dependencies with JBFindSymbol
Models tend to not understand this until instructed, instead resorting to their internal much less efficient tools by default.
2026-02-23 19:37:42 +01:00
Michael Panchenko 1db52b16bf Overview tool: raise ValueError for directory paths (if multiple LS are active)
The error is raised through `LanguageServerManager.get_language_server`, where it is done conservatively (only if multiple LS are available and we can't decide)
2026-02-23 19:32:41 +01:00
by22Jy bc9bd9085e feat: Add topic grouping support for memories (#1058) 2026-02-23 18:56:34 +01:00
Michael Panchenkoandjoachim.arting 6214b46e7b feat(csharp): add .slnx solution file support (#1056)
Co-authored-by: joachim.arting <joachim.arting@gmail.com>
2026-02-23 13:49:15 +01:00
de186907f2 Update Kotlin Language Server to v261.13587.0 and refactor it to use DependencyProvider (#1061)
---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
2026-02-23 12:35:13 +01:00
joachim.arting 88cd3c27a2 feat(csharp): add .slnx solution file support 2026-02-23 09:08:18 +01:00
Hyun-Gyu (Ethan) KimandClaude Opus 4.6 5d417beb80 Add SystemVerilog language server support using slang-langserver (#990)
* Add SystemVerilog language server support using slang-langserver

- Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support
- Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows
- Add pytest marker and basic test cases for symbol retrieval

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ruff lint errors by updating configuration

- Add UP042, PLW0108, PLC0207 to ruff ignore list (style preferences)
- Update test repo pyproject.toml to use lint.select and lint.isort sections

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace slang-langserver with verible-verilog-ls for SystemVerilog

slang v7.0 release URLs return 404 as the project stopped providing
pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance)
which actively maintains binary releases for all major platforms.

Changes:
- Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057
- Add Linux ARM64 platform support
- Update fallback and error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add SystemVerilog language server support using slang-langserver

- Add Language.SYSTEMVERILOG enum with .sv, .svh, .v, .vh file support
- Create SystemVerilogLanguageServer class with auto-download for Linux, macOS, Windows
- Add pytest marker and basic test cases for symbol retrieval

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace slang-langserver with verible-verilog-ls for SystemVerilog

slang v7.0 release URLs return 404 as the project stopped providing
pre-built binaries after v3.0. Migrate to Verible (CHIPS Alliance)
which actively maintains binary releases for all major platforms.

Changes:
- Update RuntimeDependency URLs to Verible v0.0-4051-g9fdb4057
- Add Linux ARM64 platform support
- Update fallback and error messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix Verible binary paths for macOS and Windows

The archive directory names differ per platform:
- Linux: verible-v0.0-4051-g9fdb4057/bin/
- macOS: verible-v0.0-4051-g9fdb4057-macOS/bin/
- Windows: verible-v0.0-4051-g9fdb4057-win64/ (no bin/ subdirectory)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update docs and comments: slang-langserver → verible-verilog-ls

- Update pyproject.toml marker description
- Update ls_config.py docstring
- Update test file docstrings
- Remove unused _slang_available() function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add verible-verilog-ls to CI and improve SystemVerilog LS

- Add verible-verilog-ls installation step to pytest.yml for
  Linux/macOS/Windows (GitHub Releases, follows ZLS pattern)
- Remove unused threading import and server_ready Event
- Add capability validation (assert textDocumentSync, warn on
  missing documentSymbolProvider/definitionProvider)
- Add window/logMessage notification handler
- Add codeAction, formatting, documentHighlight capabilities
- Improve error message with conda/Homebrew/GitHub install methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add verible detection tests and remove redundant ALU tests

Add comprehensive unit tests for verible-verilog-ls binary detection
logic (PATH lookup, version logging, graceful degradation, download
fallback). Remove duplicate ALU symbol tests that tested the same
LSP operations already covered by counter tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix SystemVerilog LSP convention deviations from code review

- Add client/registerCapability handler (all other 31 LSPs have it)
- Add locale: en to initialize params (project convention)
- Change log.debug to log.info for window/logMessage handler
- Fix dead code in test_find_references_cross_file skip/assert logic
- Move repeated imports to module top level in detection tests
- Remove unused IS_WINDOWS/IS_UNIX variables and sys import
- Fix hardcoded line number comment to semantic description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Windows CI verible path: flat zip structure has no bin/ subdir

The Windows verible zip extracts to verible-VERSION-win64/ with
executables directly in the root (no bin/ subdirectory), unlike
Linux/macOS tar.gz which have bin/ subdirectory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix macOS CI verible path: tar.gz extracts with -macOS suffix

Each platform has different directory naming in verible releases:
- Linux: verible-VERSION/bin/ (no suffix)
- macOS: verible-VERSION-macOS/bin/ (has -macOS suffix)
- Windows: verible-VERSION-win64/ (flat, no bin/ subdir)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor: read Verible version from settings instead of hardcoding

Extract hardcoded version string into _custom_settings.get("verible_version")
with the current version as default. This allows version override via
project.yml without changing source code.

Also introduce DEFAULT_VERIBLE_VERSION constant in detection tests
for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add rename tests and strengthen existing SystemVerilog tests

- Add TestSystemVerilogRename: within-file, cross-file, module rename
- Strengthen all existing tests with exact position/value verification
- Remove all pytest.skip, replace with assert (review feedback)
- Remove isinstance check in _find_symbol_by_name (review feedback)
- Extract _extract_hover_text and _extract_changes helpers
- Remove test_diagnostics (requires shared ls.py fix, separate PR)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 21:08:32 +01:00
Michael Panchenko dcbf08520d Merge pull request #956 from n-r-w/hover_budget 2026-02-20 17:44:23 +01:00
Michael Panchenko a7bda849f4 Use a single SharedConfig instead of 4 classes from which both configs inherit 2026-02-20 17:39:25 +01:00
Michael Panchenko f6874be852 Minor: empty instead of null in yaml [ci skip] 2026-02-20 17:39:25 +01:00
Dominik Jain 5bb6ff4746 test_open_file_cache_invalidate: Add delay to hopefully improve robustness 2026-02-20 15:57:19 +01:00
Dominik Jain 9f34099ba6 Merge pull request #1059 from mareurs/fix/avoid-unnecessary-lsp-didopen-didclose
fix: avoid unnecessary didOpen/didClose LSP calls for cached files in full symbol tree
2026-02-20 15:51:42 +01:00
Dominik Jain ce246c2d39 Clarify that plugin installation should be on the host only 2026-02-20 15:05:38 +01:00
Dominik Jain 49077e1533 _request_document_symbols: Simplify opening of the file buffer
By applying the _open_file_context context manager, we avoid the need for
calling ensure_open_in_ls explicitly
2026-02-20 14:59:05 +01:00
Michael Panchenko e62f518e4e FindReferences tools - remove include_info parameter
Rationale: requesting the info is just not worth it. The risk of the tool being slow or the info bloating the answer unnecessarily are too high. If an agent needs more info about the found references, it can get this info by itself in subsequent tool calls,
2026-02-20 14:56:10 +01:00
Michael Panchenko 9c50d2882a Added a base class ToolBehaviorConfig, renamed hover to symbol_info
The latter because we likely will eventually start using the same field for JB tools
2026-02-20 14:41:42 +01:00
Dominik Jain d7d3435abe Improve WSL usage information for JetBrains plugin #1057 2026-02-20 14:39:27 +01:00
Marius AilincaandClaude Opus 4.6 7e72ef30bf fix: avoid unnecessary didOpen/didClose LSP calls for cached files in full symbol tree
request_full_symbol_tree was opening every file in the language server
(sending didOpen + didClose notifications) even when document symbols
were already cached. For a ~600 file Kotlin project, this caused 1198
unnecessary pipe writes to the LSP process, taking ~9 seconds.

By passing open_in_ls=False, files are only read locally for cache
validation. The LSP is only notified when a cache miss requires
re-parsing. This reduces full-project symbol tree time from ~9.5s
to ~0.5s (19x improvement) on cached runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:24:06 +02:00
Dominik Jain d66152bc29 JetBrainsPluginClient: Improve error message when no plugin found,
asking the use to open the project in the IDE

Resolves #1019
2026-02-20 12:29:19 +01:00
aleksbeloushkin-srb db9980f0ed feat: add save and clear log buttons to dashboard log page (#1050) 2026-02-19 18:52:30 +01:00
Michael Panchenko 4086ce5e6e Merge branch 'main' into hover_budget
# Conflicts:
#	src/serena/config/serena_config.py
#	src/serena/symbol.py
#	src/serena/tools/symbol_tools.py
#	src/solidlsp/ls.py
#	test/serena/test_symbol.py
2026-02-19 17:44:15 +01:00
Dominik Jain 3791c1b050 CSharpLanguageServer: Make clear that pwsh is required 2026-02-19 17:23:46 +01:00
Dominik Jain c8d35d8d5f Improve exception message (ask for language to be reported) 2026-02-19 17:23:20 +01:00
TJ Kolleh 1ea5f0c25f feat(scala): Add stale lock detection for Metals H2 database (#1012)
* feat(scala): Add stale lock detection for Metals H2 database

Add detection and automatic cleanup of stale Metals H2 database locks
to improve multi-instance support. When a Metals process crashes without
proper cleanup, it can leave a lock file that prevents proper AUTO_SERVER
coordination with new instances.

Changes:
- Add metals_db_utils.py with detection logic for stale locks
- Add StaleLockMode enum (auto-clean/warn/fail) for configurable behavior
- Add MetalsStaleLockError exception for fail mode
- Integrate stale lock checking into ScalaLanguageServer init
- Add configuration options: on_stale_lock, log_multi_instance_notice
- Add comprehensive unit tests for detection logic

This enhancement allows Serena's Metals to coexist with VS Code or other
editors running Metals on the same project, with proper handling of edge
cases like crashed processes.

* test(scala): Add integration tests for stale lock handling modes

Add 7 integration tests for ScalaLanguageServer stale lock detection:
- AUTO_CLEAN mode cleans stale locks and proceeds
- WARN mode logs warning without cleanup
- FAIL mode raises MetalsStaleLockError
- ACTIVE_INSTANCE logs info when notice enabled
- ACTIVE_INSTANCE silent when notice disabled
- NO_DATABASE proceeds silently
- NO_LOCK proceeds silently

Tests use mocking to avoid requiring Java/Coursier/Metals.

* docs(scala): Add multi-instance and stale lock documentation

Document Metals multi-instance support via H2 AUTO_SERVER:
- Explain how multiple Metals instances share database and Bloop
- Document memory considerations (~500MB per JVM)
- Add stale lock detection configuration options
- Document on_stale_lock modes (auto-clean, warn, fail)
- Add YAML configuration examples

* docs: Clean up docs

Removed memory considerations and additional configuration sections from the Scala setup guide.

* refactor(scala): Extract settings helper and add module-level constants

- Add DEFAULT_METALS_VERSION, DEFAULT_CLIENT_NAME, DEFAULT_ON_STALE_LOCK,
  DEFAULT_LOG_MULTI_INSTANCE_NOTICE constants to eliminate duplication
- Extract _get_scala_settings() pure function for centralized settings parsing
- Remove redundant cleanup_stale_lock import
- Add warning log when AUTO_CLEAN mode fails to remove stale lock
- Simplify lock path handling with ternary expression

This refactoring improves code maintainability by centralizing Scala
settings extraction and applying functional programming principles.

* chore(scala): fix typo in docstring and comments
2026-02-19 13:30:05 +01:00
Dominik Jain 547a938832 Make thinking tools optional (disabled by default) 2026-02-17 14:52:45 +01:00
Dominik Jain f117196989 Add section on logs to usage documentation 2026-02-17 14:05:54 +01:00
Dominik Jain 16c2124feb Disable other TestSwiftLanguageServerBasics::test_request_references_* tests in CI #1039 2026-02-15 22:39:30 +01:00
Dominik Jain 7f8c6311fb Merge pull request #1046 from oraios/robust-plugin-path-matching
JetBrainsPluginClient: Generalise path matching
2026-02-15 21:27:45 +01:00
Dominik Jain 4a0812972f JetBrainsPluginClient: Generalise path matching
* Account for additional prefixes
  * Account for WSL vs. Windows path mismatch

Add a test for path matching
2026-02-15 18:41:10 +01:00
Dominik Jain 448b3693bc Merge pull request #1036 from oraios/generic-symbol-output-grouping
Implement generic SymbolDictGrouper
2026-02-15 13:19:08 +01:00
Dominik Jain b7ce737599 Disable TestSwiftLanguageServerBasics::test_request_references_calculator_class in CI #1039 2026-02-15 12:44:31 +01:00
Dominik Jain 52cc9729d2 Disable TestFSharpLanguageServer::test_hover_information in CI #1039 2026-02-15 00:57:55 +01:00
Dominik Jain 070b0ae5ac Fix mypy issues 2026-02-14 23:34:43 +01:00
Dominik Jain 629bc75b97 Make test_find_symbol_references support both grouped and ungrouped output format 2026-02-14 23:34:43 +01:00
Dominik Jain be288214c1 Merge remote-tracking branch 'origin/main' into generic-symbol-output-grouping 2026-02-14 21:22:37 +01:00
Dominik Jain 15f60a0b1f Merge pull request #1043 from oraios/mypy-test
Enable mypy for test/
2026-02-14 21:14:29 +01:00
Dominik Jain e23800bea4 Disable TestSerenaAgent::test_find_symbol for FSHARP in CI #1039
Use apply instead of apply_ex in test to make exceptions visible
2026-02-14 20:26:20 +01:00
Dominik Jain 0edfcb20ed Merge remote-tracking branch 'origin/main' into generic-symbol-output-grouping 2026-02-14 19:50:14 +01:00
Dominik Jain 7513800a0f Fix mypy issues in tests 2026-02-14 19:48:07 +01:00
Dominik Jain 177f0f46cb Enable mypy for test/ (allowing untyped defs) 2026-02-14 19:31:41 +01:00
Dominik Jain e20af1a328 Disable TestLanguageServerCommonFunctionality::test_open_file_cache_invalidate in Windows CI #1039 2026-02-14 19:13:02 +01:00
Dominik Jain 2024747e7f Disable TestSerenaAgent::test_find_symbol_references for TYPESCRIPT in CI #1039 2026-02-14 19:10:25 +01:00
Dominik Jain 31d458583f Remove 'on CI' suffix from CI task name [skip ci] 2026-02-14 18:05:08 +01:00
Dominik Jain ee992690f2 Add sleep time to fix flaky test in Windows CI 2026-02-14 17:43:35 +01:00
Dominik Jain f704abefbf Merge pull request #1041 from oraios/skip-flaky-tests
Skip flaky tests in CI
2026-02-14 16:54:41 +01:00
Dominik Jain 3ab0720ff4 Disable TestSerenaAgent::test_find_symbol for FSHARP in CI #1039 2026-02-14 14:20:26 +01:00
Dominik Jain 2e2384020a Disable TestNixLanguageServer::test_hover_information in CI #1039 2026-02-14 14:20:26 +01:00
Dominik Jain 9e95663cd7 Disable TestFSharpLanguageServer::test_find_referencing_symbols_across_files in CI #1039 2026-02-14 14:20:25 +01:00