Skip to content

Emit workshop-rs/mapped-text-v1 from opy-provider #362

Description

@e54-bot

Readiness: ready-for-implementation once wrightkit/workshop-rs#272 lands (parallel with wrightkit/language-provider-protocol#39).

Decision: wrightkit/workshop-rs#271 · workshop-rs ADR-0013.

Goal

Emit workshop-rs/mapped-text-v1 from opy-provider so Workshop-level evidence can be attributed to authored .opy source.

Scope

  • Return workshop-rs/mapped-text-v1 from lpp/compile only when the request accepts it; otherwise keep workshop-rs/text-v1.
  • Build the mapping with the workshop-rs SourceMap from the spans lowering already attaches.
  • Attribution policy (opy-rs owned): included files map to their own document URIs; macro-expanded code maps to the invocation site; generated helper nodes carry no span.

Non-goals

  • Nested value mappings.
  • Changes to OPY diagnostics or lowering output.

Acceptance criteria

  • Mapped output only when accepted; unchanged text-v1 output otherwise (tested both ways).
  • Column units match Position (1-based Unicode scalar values), tested with non-ASCII source.
  • Multi-file projects: include-origin nodes carry their own URIs, matching provider document URIs.
  • Macro-expanded nodes map to the invocation site; generated helpers are unmapped (tested).
  • A pinned Bastion revision compiles to mapped-text-v1 whose mapping applies to the re-parsed Workshop text without shape mismatch.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions