Skip to main content

Module trace_error

Module trace_error 

Source
Expand description

Stack-trace frame resolution output contracts (fallow trace-error). Stack-trace frame resolution contract for fallow trace-error.

The verb answers one narrow question: for each frame of a runtime stack trace, which definitions in the analysed project does that frame’s identifier name? It is deliberately easy to overclaim here, so the wire shape is built so that it cannot:

  • a frame that matches several definitions reports ambiguous and lists every candidate, instead of picking one and calling it the answer;
  • a frame that matches nothing reports not_found instead of being dropped;
  • a frame that matches one definition but whose own line sits at a different declaration carries line_mismatch, because the look-up asks about the identifier and not about the line;
  • a frame the project graph was never asked about (a dependency frame, a runtime-internal frame, a generated bundle, or a frame carrying no identifier to look up) reports not_attempted rather than borrowing not_found’s meaning;
  • every frame read from the input appears in frames, in input order, and ErrorTraceCounts publishes the per-outcome totals, so a caller can see exactly how much of its trace went unanswered.

No source-map resolution is performed. A frame pointing into a build artifact is reported as such, because a stale map rebinds silently to the wrong line and a wrong line is worse than an honest refusal.

Structs§

ErrorTrace
Result of resolving a runtime stack trace against the project graph.
ErrorTraceCandidate
One definition a frame’s identifier could name.
ErrorTraceCounts
Per-outcome totals for an ErrorTrace.
ErrorTraceFrame
One frame read from the input stack trace.

Enums§

ErrorTraceSchemaVersion
Wire-version discriminator for ErrorTrace. Independent from the global SchemaVersion and from the other trace payloads, like crate::trace::ImportPathTraceSchemaVersion. Serializes as a string const so JSON consumers can switch on it.
FrameOrigin
Where a frame’s source location sits relative to the analysed project.
FrameResolution
What the project graph could say about a frame’s identifier.