julia-script / julia-script/silk

Index workspace references beyond the open-root import closure

Open
#179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lsp new feature P2
Dominant language
TypeScript
Stars
48
Forks
0
Avg merge
4h 49m
Merged PRs (30d)
213

Description

Summary

Make references and rename aware of source-root modules outside the current open-root import closure.

Today the LSP matches canonical SemanticOccurrence identities across the accepted ProjectAnalysis, which contains open roots and their outgoing imports. A closed module that imports the selected declaration is invisible unless some open root reaches it.

Scope

  • Add immutable per-module resolved-use summaries keyed by canonical semantic identity.
  • Maintain a workspace reference layer separately from the lightweight export inventory and current semantic project snapshot.
  • Use the import inventory introduced by #178 to derive reverse dependents and narrow semantic work.
  • Refresh reference summaries lazily or through bounded background work.
  • Retain use context, not just location:
    • declaration
    • import
    • direct call
    • first-class value
    • run subject
    • type use
    • read/write/move/drop
  • Preserve open-buffer precedence and accepted-revision coherence.
  • Define explicit freshness/completeness states so read-only references do not silently imply a complete rename.
  • Require complete, current, editable coverage before producing workspace rename edits.

Acceptance criteria

  • References to a top-level declaration include uses from closed reverse-dependent source-root modules.
  • Locals, parameters, and pattern bindings remain module/function-local.
  • Results are keyed by semantic identity rather than spelling.
  • File create/change/delete/rename and import-edge changes invalidate only affected summaries.
  • The reference query reports or withholds incomplete results according to a documented freshness policy.
  • Rename cannot return a partial workspace edit when a relevant module is stale or uneditable.
  • Unsaved open buffers override on-disk summaries.
  • Generated-workspace tests cover reverse-dependency narrowing and per-module reuse.

Architecture constraints

  • Do not fold semantic occurrences into the header-only WorkspaceInventory.
  • Do not make every file a permanent ProjectAnalysis root.
  • Treat persistence as a later profiling-driven startup optimization.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the current ProjectAnalysis, lightweight WorkspaceInventory, and the import inventory introduced by #178 to understand existing scope and reverse-dependent discovery. Define the freshness policy and per-module reference summaries, then use the generated-workspace tests to verify narrowing, invalidation, open-buffer precedence, complete rename coverage, and reuse.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.