crates/lsp/src is fully audited (all 5 files, no MEDIUM/LOW remaining): #517
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq!517
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor-lsp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
crates/lsp/src is fully audited (all 5 files, no MEDIUM/LOW remaining):
diagnostics.rs, main.rs, completion.rs, includes.rs, words.rs — each
refactored with focused helper extractions, every step verified green
(clippy clean, 46 seq-lsp tests passing throughout). The checklist at
tmp/rust-audit-crates-lsp-src.md has it all, including the deferred
cross-file notes (the code_actions.rs split, the main.rs helpers module,
and a shared signature_or_unknown helper).
Three audit checklists now sit in tmp/ for whenever you pick back up —
compiler (MEDIUM/LOW + tests remaining), core (2 LOW remaining), and lsp
(complete). Cheers!
Review — approve, no blockers
Pure helper-extraction refactor across the 5
crates/lsp/srcfiles (+204/−228, net −24). Reviewed each diff; all behavior-preserving, format strings and fallbacks carried over verbatim.diagnostics.rs— two boilerplate collapses:make_diagnostic(range, severity, code, source, message)(4 call sites, all had identicalcode_description/related_information/tags/data: None) andquickfix_action(title, edit, is_preferred)(3 sites;is_preferredcorrectly threaded asSome(true)/Some(false)/None). Bonus cleanup:lint_to_code_actionshed its unused_sourceparam.main.rs—make_range(start_line, start_char, end_line, end_char)generalizes the oldmake_definition_range, which now delegates to it and keeps thechars().count() + 2UTF-8 handling.markdown_hover(value)collapses 3 identicalHover { Markup, range: None }literals; the inlineusewas hoisted. Hover/symbol ranges unchanged.words.rs—builtin_word_info/stdlib_word_infoextracted from the twocollect_*closures. Signature formatting (format_effect,"( ? )"fallback) and doc handling (builtin: filter-non-empty; stdlib:None) preserved;sort_byon the stdlib group intact.completion.rs—markdown_doc(value)collapses 5Documentation::MarkupContentliterals. All format strings preserved.includes.rs—parse_module(content, what) -> Option<Program>consolidates the two parse-or-debug!-and-return blocks. Log messages identical ("stdlib {name}",canonical.display()).The deferred cross-file notes in the description (
code_actions.rssplit, amain.rshelpers module, and a sharedsignature_or_unknownhelper) are correctly left out of scope. The"( ? )"fallback now appears in three spots (builtin_word_info,stdlib_word_info,lookup_word_hover) — that's the natural seam for the futuresignature_or_unknownextraction.Note on process: reviewed by diff inspection against
main; did not re-runjust cilocally on this branch. LSP changes don't affect compiled-program behavior, and these are provably behavior-preserving; the PR's clippy-clean + 46 seq-lsp passing claim is consistent.