4.6 KiB
4.6 KiB
PBS Diagnostics Workshop 1
Status: Active
Purpose
Run the first focused discussion for 11. Diagnostics Specification.md on the minimum diagnostic contract:
- diagnostic identity,
- phase attribution,
- source attribution,
- and cross-file attribution for import and linking failures.
Why This Slice First
This slice should come first because every later diagnostics discussion depends on a stable answer to:
- what one diagnostic fundamentally is,
- what metadata is guaranteed,
- and what conformance is even allowed to assert.
It should stay narrow and avoid wording or warning policy for now.
Proposed Meeting Order
- Reconfirm already-settled rejection and phase facts.
- Close the minimum diagnostic identity model.
- Close the minimum source-attribution package.
- Close cross-file attribution for import, barrel, and linking failures.
- Record carry-forward items for wording and warning workshops.
Already-Settled Inputs To Reconfirm
The meeting should explicitly reaffirm:
- syntax and static semantics already define required rejection classes,
- manifest/import failures are deterministic compile-time failures,
- load-facing malformed or unauthorized host usage is deterministic,
- traps are fatal runtime outcomes rather than ordinary diagnostics,
- and stable source spans are already required at token and AST level.
These should not be reopened here.
Decisions To Produce
- The minimum normative identity of a diagnostic.
- The minimum mandatory attribution fields.
- Cross-file attribution rules for import and barrel failures.
- The smallest stable phase vocabulary diagnostics must expose.
Candidate Decisions
1. Diagnostic Identity Is Phase Plus Stable Class, Not Mandatory Numeric Code
Candidate direction:
- v1 requires deterministic phase attribution and a stable rejection class.
- A machine-readable code is allowed but not yet mandatory.
- Human wording is not the identity of the diagnostic.
Rationale:
- This keeps the contract stable without overfitting to one toolchain code system.
- It leaves room to add codes later without making v1 blocked on taxonomy design.
Alternative to discuss:
- require stable codes now because conformance and tooling benefit from them.
2. Minimum Attribution Package Is File, Primary Span, and Message Class
Candidate direction:
- every source-attributable diagnostic must expose: primary file, primary source span or location, stable phase, and enough human-readable content to distinguish the rejection class.
- secondary notes are optional unless another rule explicitly requires them.
Rationale:
- This matches the current draft while making the required payload explicit.
3. Cross-File Failures Need At Least One Primary Site And Optional Related Sites
Candidate direction:
- import failure must point primarily to the importing site,
- barrel-entry mismatch must point primarily to the barrel site,
- tools may additionally point to the unresolved or conflicting declaration site when known,
- but v1 does not require one exact note shape yet.
Rationale:
- This keeps source-facing diagnostics actionable without freezing one multi-span presentation format.
4. Keep A Small Stable Phase Vocabulary
Candidate direction:
- the minimum stable external vocabulary is: syntax, static semantics, manifest/import resolution, linking, and host-binding/capability admission.
- tools may subdivide internally if they map back deterministically.
Rationale:
- This gives
13enough oracle structure without forcing one compiler pipeline.
Questions To Resolve In The Room
- Is phase plus stable class enough, or should v1 require diagnostic codes now?
- Must every cross-file failure include more than one source location?
- Should
linkingbe a diagnostics phase name directly, or only a broaderresolutionbucket? - Are secondary spans purely optional, or mandatory for some classes such as conflicting imports?
- What is the minimum conformance-friendly diagnostic payload that is still implementation-neutral?
Expected Outputs
This workshop should produce:
- a decision record for diagnostic identity,
- a decision record for required attribution fields,
- a cross-file attribution policy draft,
- and a cleanup list for
11.
Explicit Deferrals For Workshop 2
- wording stability,
- notes/help obligations,
- warning policy,
- and backend-originated diagnostic mapping.
Inputs
docs/pbs/specs/11. Diagnostics Specification.mddocs/pbs/specs/13. Conformance Test Specification.mddocs/pbs/specs/14. Name Resolution and Module Linking Specification.mddocs/pbs/agendas/11. Diagnostics Agenda.md