Repository activity
40458 results across all weeks
fix(code-actions): preserve nested or-patterns in destruct-line
Merlin can group missing case-analysis alternatives inside nested or-patterns. Destruct-line previously split every |, turning patterns such as ((B | C), _) into syntactically invalid match cases.
Rudi Grinberg (@rgrinberg)fix(code-actions): reject extraction of scoped constructors
Function extraction can move constructor references outside their scope, producing invalid code or changing meaning when a local constructor shadows another declaration.
Rudi Grinberg (@rgrinberg)fix(code-actions): reject malformed destruct-line replies
Return no destruct-line action when a Merlin recovery reply lacks a usable match separator, rather than leaking an internal error. Ordinary destruct actions remain unchanged.
Rudi Grinberg (@rgrinberg)fix(code-actions): skip inapplicable inline edit construction
Check inline applicability before constructing replacement edits. Return no action for bindings without recognized inline uses, or a disabled action when all recognized uses are blocked by shadowing.
Rudi Grinberg (@rgrinberg)fix(diagnostics): convert related location lines to LSP
Merlin diagnostics can encode related locations in formatted compiler messages. Ocamlc_loc.parse_raw retains the compiler's one-based line numbers, but the conversion passed them unchanged to zero-based LSP positions.
Rudi Grinberg (@rgrinberg)fix(dune): clean up disconnected RPC instances
Finalize a running Dune RPC instance before reporting an exceptional exit. Disconnection now clears that instance's diagnostics and promotion registrations, while map removal is guarded by physical identity so a delayed finalizer cannot discard a replacement connection for the same root.
Rudi Grinberg (@rgrinberg)fix(dune): reconcile promotions by diagnostic
Dune attaches promotion metadata to individual diagnostics, but the server currently stores promotions only in a map keyed by source path. When two rules produce diagnostics that promote the same source, inserting the second promotion hits an assertion, aborts the whole diagnostic batch, and disconnects that Dune instance. #2087 records the resulting missing…
Rudi Grinberg (@rgrinberg)fix(lsp): accept generic progress notifications
Accept generic $/progress values in both notification directions, including partial results, while continuing to reject malformed parameter envelopes.
Rudi Grinberg (@rgrinberg)fix(lsp): generate document filter contracts
Generate the LSP 3.18 text-document filter contract instead of retaining the stale handwritten record. This preserves omitted optional fields, so registrations emit valid selectors such as { "language": "ocaml" } rather than filling unrelated fields with null.
Rudi Grinberg (@rgrinberg)fix(lsp): generate notebook synchronization contracts
Remove the notebook synchronization declarations from the generator skip list and replace their handwritten unit placeholders with the LSP 3.18 metamodel-generated contracts. Valid notebook filters, synchronization options, and registration options now decode and round-trip instead of encoding as null or being rejected.
Rudi Grinberg (@rgrinberg)fix(references): honor includeDeclaration
Honor ReferenceContext.includeDeclaration instead of always returning every Merlin project occurrence.
Rudi Grinberg (@rgrinberg)fix(rename): expand record puns
Expand record puns when renaming a variable or record field, preserving the untouched side. Cover expressions, patterns, qualified puns, type constraints and coercions, and cross-file occurrences. Insert the explicit assignment after any annotation without rewriting its text, preserving qualifiers, comments, and formatting.
Rudi Grinberg (@rgrinberg)fix(rename): keep occurrence conversion on one snapshot
Rename queried Merlin using one document snapshot but later converted the returned locations and selected document versions from the mutable store. A concurrent didChange could therefore combine old occurrence offsets with newer source and raise Invalid_argument("index out of bounds").
Rudi Grinberg (@rgrinberg)fix(selection-range): clamp recovered ranges to source
Merlin recovery can return virtual-EOF locations for selection ranges. Forwarding those locations directly produces positions beyond the actual document bounds.
Rudi Grinberg (@rgrinberg)fix(selection-range): return ranges containing requested positions
Merlin recovery can return enclosing-query locations that do not actually contain the requested cursor, producing an invalid textDocument/selectionRange response.
Rudi Grinberg (@rgrinberg)flake.lock: Update
Automated changes by the update-flake-lock GitHub Action.
github-actionsrefactor(rename): extract workspace edit construction
Separates collection of Merlin rename occurrences from their conversion into a workspace edit. The extracted boundary operates on document URIs and LSP ranges while preserving the existing source lookup, version selection, and edit behavior.
Rudi Grinberg (@rgrinberg)refactor(server): add config data interface
Adds an explicit interface for Config_data, exposing the configuration records, JSON conversions, and default value while hiding compiler-generated implementation details.
Rudi Grinberg (@rgrinberg)test(code-actions): cover constructor scope during extraction
Adds coverage for extract-function behavior around local exception constructor scope:
Rudi Grinberg (@rgrinberg)test(code-actions): expose destruct-line separator bugs
Adds end-to-end reproductions for destruct-line selecting the wrong with while formatting generated matches.
Rudi Grinberg (@rgrinberg)