Skip to main content

bynk_project/
diagnostics.rs

1use std::path::PathBuf;
2
3use bynk_syntax::error::CompileError;
4
5/// v0.24 (ADR 0052): a compile error attributed — where possible — to the
6/// project-relative source file it belongs to, tagged at the collection
7/// point (the phase that produced it knows which file it was processing).
8/// `None` is the project-level bucket: validations spanning files
9/// (group/cycle/directory consistency) with no single owning file.
10///
11/// P4.0 (#1113): moved here from `bynk-emit`'s `project::diagnostics` — the
12/// one item of that module with no `Mode`/`ErrorSink`-shaped driving logic
13/// behind it, just a plain attributed-diagnostic value type. `Mode`,
14/// `ErrorSink`, `ProjectAnalysis`, `ProjectFailure`, `ContextSequenceInfo`,
15/// and `ContextBoundaryInfo` all stay in `bynk-emit` (each is a fact about
16/// how the pipeline is driven or consumed, not about the project model).
17pub struct AttributedError {
18    pub source_path: Option<PathBuf>,
19    pub error: CompileError,
20}