Conversation
Add a mechanism for capturing heap snapshots of the JETLS server process to analyze memory footprint and detect potential memory leaks. Creating a `.JETLSProfile` file in the workspace root triggers a heap snapshot. The server saves it as `JETLS_YYYYMMDD_HHMMSS.heapsnapshot`, shows a notification, and automatically deletes the trigger file via LSP `workspace/applyEdit`. The implementation uses `Profile.take_heap_snapshot` with streaming mode and includes progress indicator support. The generated snapshots can be analyzed using Chrome DevTools. Written with Claude
Use RelativePattern for file watching to ensure .JETLSConfig.toml is only recognized in the workspace root directory. Previously, config files in subdirectories were also loaded due to the "**/" glob pattern, which was inconsistent with the documentation.
Add a script to analyze V8 heap snapshot files (.heapsnapshot) generated by JETLS's profiling feature. The script parses the snapshot and displays a summary of memory usage by object type, sorted by shallow size. Usage: julia --project=scripts scripts/analyze-heapsnapshot.jl <snapshot> Uses binary units (1 KB = 1024 bytes) consistent with macOS and htop. Written by Claude
Add functionality to trace object retainers in heap snapshots, helping identify memory leak sources. New features include: - `HeapEdge` and `HeapSnapshot` structs for edge/retainer tracking - `find_nodes_by_type` and `find_nodes_by_name` for filtering nodes - `print_retainers` for aggregated retainer statistics - `print_retainer_chain` for detailed chain visualization - `--retainers=NAME` CLI option Also improves code quality with explicit type annotations and uses DFS (`pop!`) instead of BFS (`popfirst!`) for better performance. Written by Claude
Delete methods defined in previous analysis modules after re-analysis. While this doesn't free memory (`Method` objects remain in `Core.methodtable`), it removes them from reflection APIs like `methods()`, preventing stale methods from appearing in signature help or completions.
Clear `Pkg.Registry.REGISTRY_CACHE` in finally blocks after package environment operations to reduce memory footprint. This is a temporary workaround using internal API and should be removed once a proper solution for module/CodeInstance garbage collection is available in Julia runtime.
Add support for merging array-type configuration fields between LSP config and file config sources. Previously, file config would completely override LSP config for such fields. Now, entries with matching keys are merged (file config wins), while entries unique to either source are preserved. This is implemented through a new `merge_key` interface that `ConfigSection` subtypes appearing in Vector fields must implement. For `DiagnosticPattern`, the `pattern` value serves as the merge key.
Previously, glob patterns like `test/**/*.jl` would not match files directly under the matched directory (e.g., `test/testfile.jl`). This was caused by missing flags in `Glob.FilenameMatch`. Added the `p` (PERIOD) and `d` (PATHNAME) flags to ensure: - `**` correctly matches empty path segments - Hidden files/directories (e.g., `.git/`) are excluded from matching
This adds an internal, experimental option to override the analysis module for files matching specific glob patterns. When a file path matches a configured pattern, the analysis uses the specified pre-loaded module instead of searching for an environment. This is useful for development scenarios where certain files should be analyzed using a specific module that is already loaded in the language server process.
* handlers: Wait for file cache population in request handlers Request handlers now use a 3-argument version of `get_file_info` that waits for the file cache to be populated instead of immediately returning an error. This fixes "file cache not found" errors that occurred when LSP requests arrived before the cache was ready, particularly right after opening files. The new `get_file_info(state, uri, cancel_flag)` polls until the cache is available, with support for cancellation and a configurable timeout (default 120 seconds to account for JIT compilation on first requests). - fixes #273 - fixes #274 - fixes #327 * update tests
Skip file watcher registration when server.state.root_path is not defined. Since .JETLSConfig.toml and .JETLSProfile only function at the project root, there is no point in registering file watchers when no root path is available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR releases version
2025-12-05.Checklist
release / Test JETLS.jl with release environmentrelease / Test jetls executable with release environmentPost-merge
releases/2025-12-05branch can be deleted after merging