Commit Graph
2090 Commits
Author SHA1 Message Date
takeokunn f2beb3bb16 Project: accept SerenaConfig instead of global_ignored_paths
Replace `global_ignored_paths: Sequence[str]` with `serena_config: SerenaConfig | None`
in Project.__init__ and propagate through RegisteredProject for more general and
future-proof interfaces.
2026-02-13 15:37:29 +09: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
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
Dominik Jain 9d9e83770e Remove event completions_available and other superfluous events in LS implementations 2026-02-01 21:02:21 +01:00
Dominik Jain 0f30a850c4 Project: Initialise ignorespec and list of patterns asynchronously
Resolves #980
2026-02-01 20:13:03 +01:00
Dominik Jain 811e1981b5 Merge pull request #978 from oraios/dependency-provider-rust
Convert RustAnalyzer to use LanguageServerDependencyProviderSinglePath
2026-02-01 18:50:37 +01:00
Dominik Jain 6b87ffd758 Convert RustAnalyzer to use LanguageServerDependencyProviderSinglePath 2026-02-01 14:29:39 +01:00
Michael Panchenko fb3a0f5b17 Removed try-except around sensai import [ci skip] 2026-02-01 20:18:47 +07:00
Michael Panchenko 1d0b3afdc9 Removed ccls mention from readme 2026-02-01 20:09:37 +07:00
Azraf Nahian 71a6f1ff82 CCLS Support added (#975)
Also added a test suite for both clangd and ccls
2026-02-01 20:01:51 +07:00
Dominik Jain 01dc6f8734 Add note making clear the LS-specific settings need not be adjusted by most users 2026-01-31 17:22:02 +01:00
Dominik Jain 944cf5d956 Improve docs on mode configuration 2026-01-30 00:36:28 +01:00
Dominik Jain a9552b64f5 Merge pull request #969 from oraios/feature/mode-config
Improve mode configurability and general config improvements
2026-01-29 20:05:16 +01:00
Dominik Jain 80f3586186 Support forced comment updates when transferring comments
Apply forced update for 'projects' key (old comment is misleading)
2026-01-29 19:02:26 +01:00
Dominik Jain ad47570c4f Minor changes to improve uniformity of comments 2026-01-29 19:02:26 +01:00
Dominik Jain 153ccb5238 Improve --mode help text 2026-01-29 19:02:26 +01:00
Michael Panchenko f14faa12d0 Merge pull request #947 from Linde7777/fix-codex-prompt
Adjust the activation prompt for Codex, to make GPT-5 more compliant.
2026-01-29 14:26:09 +07:00
Michael Panchenko c41810a227 Better documentation of modes in cli 2026-01-29 13:49:30 +07:00