Done. LSP stdlib dedup implemented, verified, and the design doc moved to #49

Merged
navicore merged 1 commit from stdlib-dedupe into main 2026-07-05 02:39:00 +00:00
Owner

done/.

What landed

  • Deleted the LSP's local stdlib_predicates() in crates/lsp/src/completion.rs
    (the OnceLock+parse_best_effort+predicate_indicator copy).
  • completion.rs and definition.rs now both use
    plg_frontend::stdlib_predicates; — one shared source of truth for the stdlib
    vocabulary (REPL + LSP).
  • Removed now-unused imports (OnceLock, STDLIB_PL);
    BTreeSet/parse_best_effort/predicate_indicator stayed (still used by
    user_predicates).
  • Module doc updated to cite the shared helper.

Safety

  • Checkpoint first: a temporary test asserted the local set == shared set
    (predicate_indicator and Term::functor_arity are the same match arms, and
    the stdlib parses cleanly under both parsers). It passed, so the deletion is
    behavior-preserving — removed the test once it had served its purpose.
  • No user-facing change (stdlib vocab identical), so no first-class doc
    update.

Verification

  • grep stdlib_predicates crates/lsp/src → only use sites + call sites, no
    local defn.
  • fmt clean, clippy -D warnings clean workspace-wide, 511 tests pass.
  • docs/design/done/LSP_STDLIB_DEDUP.md moved to done/ (decision record).
done/. What landed - Deleted the LSP's local stdlib_predicates() in crates/lsp/src/completion.rs (the OnceLock+parse_best_effort+predicate_indicator copy). - completion.rs and definition.rs now both use plg_frontend::stdlib_predicates; — one shared source of truth for the stdlib vocabulary (REPL + LSP). - Removed now-unused imports (OnceLock, STDLIB_PL); BTreeSet/parse_best_effort/predicate_indicator stayed (still used by user_predicates). - Module doc updated to cite the shared helper. Safety - Checkpoint first: a temporary test asserted the local set == shared set (predicate_indicator and Term::functor_arity are the same match arms, and the stdlib parses cleanly under both parsers). It passed, so the deletion is behavior-preserving — removed the test once it had served its purpose. - No user-facing change (stdlib vocab identical), so no first-class doc update. Verification - grep stdlib_predicates crates/lsp/src → only use sites + call sites, no local defn. - fmt clean, clippy -D warnings clean workspace-wide, 511 tests pass. - docs/design/done/LSP_STDLIB_DEDUP.md moved to done/ (decision record).
Done. LSP stdlib dedup implemented, verified, and the design doc moved to
All checks were successful
WASM Gates / WASM gates (Tier 1 wasi + Tier 2 reactor) (pull_request) Successful in 28s
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 1m30s
a6c4bb9b0a
done/.

 What landed

 - Deleted the LSP's local stdlib_predicates() in crates/lsp/src/completion.rs
   (the OnceLock+parse_best_effort+predicate_indicator copy).
 - completion.rs and definition.rs now both use
   plg_frontend::stdlib_predicates; — one shared source of truth for the stdlib
   vocabulary (REPL + LSP).
 - Removed now-unused imports (OnceLock, STDLIB_PL);
   BTreeSet/parse_best_effort/predicate_indicator stayed (still used by
   user_predicates).
 - Module doc updated to cite the shared helper.

 Safety

 - Checkpoint first: a temporary test asserted the local set == shared set
   (predicate_indicator and Term::functor_arity are the same match arms, and
   the stdlib parses cleanly under both parsers). It passed, so the deletion is
   behavior-preserving — removed the test once it had served its purpose.
 - No user-facing change (stdlib vocab identical), so no first-class doc
   update.

 Verification

 - grep stdlib_predicates crates/lsp/src → only use sites + call sites, no
   local defn.
 - fmt clean, clippy -D warnings clean workspace-wide, 511 tests pass.
 - docs/design/done/LSP_STDLIB_DEDUP.md moved to done/ (decision record).
navicore deleted branch stdlib-dedupe 2026-07-05 02:39:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/patch-prolog!49
No description provided.