Skip to content

vscode: inspect a foldable expanded compilation unit #169

Description

@evanbrobertson

What to build

Add an on-demand, read-only “Expanded Compilation Unit” view for a root file or for an .i with an active includer context. The view should show the source oxabl actually parsed after preprocessing, with direct and nested include regions collapsed by default and expandable independently.

Each region must identify its physical source and include chain, support navigation back to that source, and use the same configuration, unsaved overlays, and compilation context as diagnostics. This is an inspection/debugging surface rather than a replacement editor buffer.

Acceptance criteria

  • A command opens a read-only virtual document for the active root compilation unit; invoking it from an .i uses that document's selected includer context.
  • The rendered body corresponds to the exact preprocessed source consumed by semantic analysis for the same revision and configuration.
  • Direct and nested include regions are visibly delimited, collapsed initially, and independently expandable through normal editor folding controls.
  • Every include region exposes its physical source path and complete include chain and offers navigation to the original source location.
  • Diagnostics displayed in the virtual document come from the same compilation context and navigate back to their physical source rather than to an invented generated location.
  • Unsaved root/include edits and relevant configuration changes refresh or invalidate the view without allowing a stale expansion to replace a newer one.
  • Missing includes, preprocessing failures, cycles, and depth limits remain visible as explicit reduced/failed expansion states rather than producing a partial view presented as complete.
  • The virtual document rejects edits and never writes expanded text to a physical source file.
  • Protocol, source-provenance, folding, navigation, refresh, and VS Code integration tests use a synthetic nested-include fixture.
  • No workspace-wide dead-code aggregation is added by this issue.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions