Skip to content

[M10] Add incremental parsing, dependency invalidation, and reanalysis #64

Description

@Teakowa

Parent: #27

Depends on: #63

Planning status: settled by the #75 contract — true in-flight cancellation is
deferred; stale-result suppression is the M10 requirement.

Goal

Make language-service updates responsive by reusing Wright's native frontend/session model where evidence justifies it, without compromising correctness.

Scope

  • Define document-change invalidation for syntax, preprocessing/includes, semantic index, CFG, diagnostics, and dependent files.
  • Reuse cached immutable/intermediate state where safe.
  • Replace stale analysis results with current-version results. True in-flight request cancellation is explicitly deferred (see [M10 planning] Reconcile cancellation and responsive-analysis contracts #75) and is not an M10 requirement.
  • Preserve deterministic results equivalent to clean full recomputation.
  • Measure latency/memory on representative files/projects before adding complex incremental mechanisms.
  • Fall back to bounded full recomputation where it is simpler and fast enough.

Non-goals

Acceptance criteria

  • Document edits produce correct updated diagnostics/semantic results with explicit version identity.
  • Incremental/cached results are equivalent to clean recomputation for covered scenarios.
  • Stale-result suppression is deterministic: stale/out-of-order client versions cannot overwrite newer state, and obsolete results are never surfaced as current. This is distinct from in-flight request cancellation, which is explicitly deferred per [M10 planning] Reconcile cancellation and responsive-analysis contracts #75.
  • Performance evidence justifies any complexity added beyond full recomputation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions