Commit Graph
2618 Commits
Author SHA1 Message Date
takeokunn e0c2a4ff93 Merge branch 'feature/support-phpactor' of ssh://github.com/takeokunn/serena into feature/support-phpactor
# Conflicts:
#	test/conftest.py
2026-02-08 01:08:26 +09:00
takeokunn 46fabd69f4 fix(test): merge PHP test classes into TestPhpLanguageServers
Consolidate TestPhpLanguageServer and TestPhpPhpactorLanguageServer
into a single TestPhpLanguageServers class. Both Language.PHP and
Language.PHP_PHPACTOR are now parametrized together, with conditional
branching where the two language servers differ in behavior.

Addresses review comment on PR #1002.
2026-02-08 01:03:17 +09:00
takeokunn c972380d0a fix(test): remove php_phpactor symlink and add repo alias mapping
Remove the unnecessary php_phpactor -> php symlink. Instead, add a
_LANGUAGE_REPO_ALIASES mapping in conftest.py so that variant language
servers (PHP_PHPACTOR, PYTHON_JEDI, RUBY_SOLARGRAPH) resolve to their
base language's test repository without needing filesystem symlinks.

Addresses review comment on PR #1002.
2026-02-08 01:03:12 +09:00
takeokunn d39967dd67 fix(php): add PHP version validation for Phpactor
Check that the installed PHP version is >= 8.1 before proceeding with
Phpactor setup. Raises RuntimeError with a clear message if the version
is too old, and logs a warning if the version string cannot be parsed.

Addresses review comment on PR #1002.
2026-02-08 01:03:04 +09:00
Dominik Jain ee6b819633 Merge pull request #1001 from oraios/fix-trace-logger
Fix logging of language server process communication, renaming
2026-02-07 15:41:42 +01:00
Dominik Jain 4d0a4f6180 Merge remote-tracking branch 'origin/main' into feature/support-phpactor 2026-02-07 15:03:41 +01:00
takeokunn 65c24a0df8 feat(php): add Phpactor as alternative PHP language server
- Introduce PHP_PHPACTOR enum and integration in ls_config
- Implement PhpactorServer for PHP with dependency management
- Update docs and changelog for Phpactor support and usage
- Add project template entry for php_phpactor
- Provide tests for Phpactor LSP definition and reference features
2026-02-07 22:40:56 +09:00
copilot-swe-agent[bot]andMischaPanch eff7cc605a Remove test file as requested
Co-authored-by: MischaPanch <35432522+MischaPanch@users.noreply.github.com>
2026-02-07 12:52:30 +00:00
Dominik Jain 8f7ef3b4bf Fix: Use regular logger instead of LSP trace logger in LanguageServerProcess
Previously, even important error cases were not logged at all, because
the trace logger is rarely enabled.

Fixes #999
2026-02-07 13:17:53 +01:00
copilot-swe-agent[bot]andMischaPanch 373baef040 Address code review feedback for consistency
Co-authored-by: MischaPanch <35432522+MischaPanch@users.noreply.github.com>
2026-02-07 12:13:37 +00:00
copilot-swe-agent[bot]andMischaPanch 8c6fdda646 Fix linting and formatting issues
Co-authored-by: MischaPanch <35432522+MischaPanch@users.noreply.github.com>
2026-02-07 12:12:17 +00:00
copilot-swe-agent[bot]andMischaPanch 61891370e4 Add installation date filtering to news display logic
Co-authored-by: MischaPanch <35432522+MischaPanch@users.noreply.github.com>
2026-02-07 12:09:52 +00:00
copilot-swe-agent[bot] 8515abec66 Initial plan 2026-02-07 12:07:29 +00:00
Dominik Jain 60226fdee7 Rename module ls_handler -> ls_process 2026-02-07 12:51:07 +01:00
Dominik Jain 5b18747ece Rename SolidLanguageServerHandler -> LanguageServerProcess 2026-02-07 12:49:44 +01:00
takeokunn 43dca464d6 feat(config): add system-global ignored_paths support
- Introduce ignored_paths to SerenaConfig for global ignore patterns
- Merge global and project ignored_paths additively in Project logic
- Update CLI and config loading to thread global_ignored_paths correctly
- Add tests for global ignored_paths, additive merge, glob patterns, and compatibility
- Update config templates and docstrings for new global ignored_paths option
2026-02-07 19:40:23 +09:00
Michael Panchenko fafebdc205 Bump wait_time_for_cross_file_referencing for TS 2026-02-06 23:21:22 +01:00
Michael Panchenko 501f76eb13 Removed obsolete override of _shutdown method in clangd_language_server.py 2026-02-06 16:25:20 +01:00
Michael Panchenko 1ac9d5c19f Merge branch 'main' of github.com:oraios/serena 2026-02-06 16:20:47 +01:00
Michael Panchenko 382e184952 Fix waiting for cross-file references - has to happen after a file was opened in ls 2026-02-06 16:16:45 +01:00
Michael Panchenko e588bc7f89 C/C++ language server fixes (#987)
Fixes longstanding clangd issues (wrong selectionRange, failure to take compile_commands.json into account) and enhances documentation about C/C++ support
2026-02-06 15:25:43 +01:00
Michael Panchenko 0639dce17b Fix assertion in test_cli_project_commands (fallback is now None, not cwd) 2026-02-06 15:13:11 +01:00
Dominik Jain 8288bf200d Add MCP shutdown log message [skip ci] 2026-02-06 12:40:56 +01:00
Dominik Jain 0528549808 RegisteredProject.matches_root_path: Use more robust equivalence check using samepath
Fixes #991
2026-02-05 15:34:25 +01:00
Dominik Jain e176fc84f1 Update developer instructions, now using uv sync 2026-02-05 14:14:57 +01:00
Dominik Jain ca49707791 Do not use CWD as a fallback for --project-from-cwd
This can be problematic if CWD is, for example, the user's home directory.
Fixes #979
2026-02-05 14:14:20 +01:00
Dominik Jain 8d38a32967 Use 'uv sync' instead of 'uv pip install' (install what's in uv.lock)
and adapt the cache key accordingly
2026-02-04 18:57:13 +01:00
Dominik Jain 603853a8b6 List dependencies in CI 2026-02-04 18:57:10 +01:00
Dominik Jain 118093ef9c Use global config in health check
Fixes #989
2026-02-04 14:04:27 +01:00
Michael Panchenko bb41cef097 Removed unnecessary input validation of hover_budget 2026-02-04 13:01:56 +07:00
Dominik Jain 1e68e2c1c6 Fix missing return types 2026-02-03 11:16:33 +01:00
Dominik Jain 2b04ab1879 Merge pull request #983 from thomhurst/csharp-nuget-org-and-dotnet-install
Modernize C# language server: Switch to NuGet.org and official .NET install scripts
2026-02-03 11:08:19 +01:00
Tom Longhurst b97bc5ac51 Warn about deprecated DotNetRuntime override
Filter out DotNetRuntime overrides from runtime_dependencies and
log a warning informing users that .NET is now installed via
Microsoft's official scripts.
2026-02-02 23:02:47 +00:00
Tom Longhurst d199718695 Add C# language server documentation
Document the runtime_dependencies setting for overriding Roslyn
Language Server download URLs and supported platforms.
2026-02-02 23:01:30 +00:00
Tom Longhurst b432560789 Make hover test assertions more specific
Assert on actual hover content (type names and symbol names) instead
of just checking for non-empty content. This verifies hover returns
meaningful type information from Roslyn.
2026-02-02 22:36:02 +00:00
Tom Longhurst 3627f61977 Address PR review: use iter_symbols() and make hover tests assertive
- Replace get_all_symbols_and_roots() with iter_symbols() to avoid
  redundant tuple unpacking
- Make hover tests assert that hover_info is not None instead of
  defensive conditionals
2026-02-02 22:28:56 +00:00
Dominik Jain 4dab291c35 Merge pull request #985 from oraios/lazy-open-file-in-ls
SolidLanguageServer: Allow to open file buffers lazily (without opening in LS)
2026-02-02 20:10:09 +01:00
Tom Longhurst 5cb8f62a02 Fix test_install_dotnet_uses_bash_script_on_linux platform detection
The test was mocking platform.system() but not the full platform detection
chain. On non-Linux CI platforms, platform.libc_ver() returns empty string,
causing "linux--x64" (double dash) instead of "linux-x64" in the platform ID.

Fix by mocking PlatformUtils.get_platform_id() directly to return proper
PlatformId values, following the pattern used in other tests.

Fixes both Linux bash script and Windows PowerShell script tests.
2026-02-02 15:53:34 +00:00
Tom Longhurst 973724c258 Add hover injection for C# type annotations
Following ALLanguageServer pattern, inject cached original symbol names
(with type annotations) into hover responses. This ensures type information
is available via hover operation as per SolidLSP convention.

- Override request_hover() to prepend original names to hover content
- Add comprehensive hover test verifying both property and method hovers
- Test covers Name property and IsAdult method

Addresses reviewer feedback about delivering type info via hover.
Test passes.
2026-02-02 14:45:06 +00:00
Tom Longhurst 0f7e9722c3 Update C# tests to use exact matching for normalized symbol names
Replace startswith() checks with exact matching now that symbol names
are normalized at the source. This is cleaner and more accurate.

Comments updated to reflect that names are normalized (not type-annotated).
All 14 tests pass.
2026-02-02 14:40:26 +00:00
Dominik Jain cefa197743 SolidLanguageServer: Allow to open file buffers lazily (without opening in LS)
Not passing the open request directly on to the LS can speed things up
for cases where we don't necessarily need the file to be open in the LS
at first (but do need to open the file and read its contents)

Applied to request_document_symbols, where we check the cache based on
the file contents but only need to open the file in the LS if there is
a cache miss.

Relates to #984
2026-02-02 15:10:43 +01:00
Tom Longhurst c59dee87eb Remove startswith() workaround from SymbolUtils
Now that C# language server normalizes symbol names at the source,
the utility function can use simple exact matching. This is cleaner
and follows the principle of fixing root causes rather than patching
callsites.

All 24 C# tests still pass.
2026-02-02 14:05:10 +00:00
Tom Longhurst 611acebe67 Normalize Roslyn symbol names and populate LSP detail field
Roslyn 5.5.0 returns symbol names with type annotations:
- Properties: "Name : string" instead of just "Name"
- Methods: "Add(int, int) : int" instead of just "Add"

This broke Serena's overload detection system which expects clean
base names with overload_idx for duplicates.

Solution:
- Override request_document_symbols() in CSharpLanguageServer
- Normalize symbol names to base form ("Name", "Add")
- Cache original names at (file, line, char) for rich info display
- Populate LSP spec's 'detail' field with type/signature info
- Process children symbols recursively

Follows AL Language Server pattern. All 24 C# tests pass.
2026-02-02 12:47:12 +00:00
Tom Longhurst cc2eb0a0be Update tests and symbol handling for new Roslyn format with type annotations
The new Roslyn 5.5.0 returns symbols with type annotations:
- Properties: 'Name : string' instead of 'Name'
- Methods: 'Add(int, int) : int' instead of 'Add'

Changes:
- Update SymbolUtils.symbol_tree_contains_name() to handle both formats
- Update test assertions to match new format (startswith checks)
- Update test expectations (new Roslyn correctly excludes definitions from references)

This provides more informative symbol information while maintaining backward compatibility.
2026-02-02 12:13:55 +00:00
Tom Longhurst f5e2b8a21b Add tests for .NET version detection edge cases
- Test cached .NET installation is reused without re-downloading
- Test .NET 9 is rejected and triggers .NET 10 install
- Test .NET 11+ versions are accepted for forward compatibility

All 7 .NET install tests now pass (4 existing + 3 new)
2026-02-02 10:57:10 +00:00
Tom Longhurst b5f8cd55dd Update CSharpLanguageServer docstring to reflect new NuGet.org and install script behavior
- Remove outdated DotNetRuntime override example
- Add CSharpLanguageServer override example
- Document .NET 10+ requirement and automatic installation
- Clarify that install scripts are now used for runtime

Addresses code review feedback about outdated documentation.
2026-02-02 10:40:16 +00:00
Tom Longhurst af0075c3e0 Use official .NET install scripts instead of manual downloads
Replace manual .NET runtime downloads with Microsoft's official dotnet-install
scripts for better maintainability and automatic platform detection.

Changes:
- Remove 6 DotNetRuntime RuntimeDependency entries (42 lines removed)
- Replace _ensure_dotnet_runtime_from_config with _install_dotnet_with_script
- Use bash script (dotnet-install.sh) for Linux/macOS
- Use PowerShell script (dotnet-install.ps1) for Windows
- Update version check from .NET 9 to .NET 10+ (supports 10.x, 11.x, etc.)
- Add comprehensive tests for install script behavior

Benefits:
- Simpler codebase (~80 lines of manual download code → ~60 lines of script invocation)
- Automatic platform/architecture detection by Microsoft scripts
- Built-in checksum verification and dependency handling
- Official Microsoft-maintained approach
- Easier version updates (just change version string)
- Better compatibility with .NET 10 (required by roslyn-language-server packages)

The language server packages from NuGet.org remain unchanged - this only
affects how the .NET runtime is installed to execute the language server.
2026-02-02 10:32:53 +00:00
Tom Longhurst b238e1d0ce Switch C# language server from Azure NuGet feed to official NuGet.org
Replace Microsoft.CodeAnalysis.LanguageServer packages from Azure DevOps
feed with official roslyn-language-server packages from NuGet.org.

Changes:
- Update package names to roslyn-language-server.* (from Microsoft.CodeAnalysis.LanguageServer.*)
- Update version from 5.0.0-1.25329.6 to 5.5.0-2.26078.4
- Add direct URLs pointing to NuGet.org for each platform variant
- Update extract paths from content/LanguageServer/<platform> to tools/net10.0/<platform>
- Simplify download logic by removing Azure feed service index lookup
- Replace _download_nuget_package_direct with simpler _download_nuget_package
- Add tests to verify NuGet.org download behavior

Benefits:
- More reliable package source (official NuGet.org vs Azure DevOps feed)
- Newer version with latest Roslyn improvements
- Simpler codebase (removed ~60 lines of Azure-specific logic)
- Better error messages with explicit URLs
2026-02-02 10:21:43 +00:00
Dominik Jain 764f26f28f Merge pull request #982 from oraios/ls-completions-event
Remove event completions_available and other superfluous events
2026-02-01 22:58:59 +01:00
Dominik Jain 0f9421e023 Merge pull request #981 from oraios/async-ignorespec
Project: Initialise ignorespec and list of patterns asynchronously
2026-02-01 22:56:51 +01:00