DiagnosticsOptions
How a converter should resolve the paths a report names.
interface in bldr
How a converter should resolve the paths a report names.
Properties
root: Directory
property
The tree the reported paths are relative to, when it is not the member's own source.
Leave it unset for the ordinary case: a tool run over a member's sources reports paths a developer can open, and saying otherwise would label every finding as untouchable. Set it when the tree was assembled — a generated client, a workspace laid out for another tool, a vendored dependency — so a consumer can still fetch the file the diagnostic names, and can say plainly that it is not one anybody edits.
See Directory.
sources: readonly SourceOrigin[]
property
How the tree the tool ran over was assembled — tree.sources().
This is what makes a location openable when the tool did not run over a
member's sources as they sit on disk. bldr/daemon compiles a workspace
merged from four members, so a rustc error in bldr-types/src/cid.rs
belongs to bldr/types and reads src/cid.rs there. Without the map the
best anyone can do is name the member whose target ran the compiler —
a different member, and a path that does not exist in it.
Each entry resolves to the CID of the tree that subtree came from, and a consumer matches those against what it already knows: the daemon holds every workspace member's root CID, so origin → member is an equality check rather than a guess.
See SourceOrigin.
stripPrefix: string
property
A path prefix to strip from every reported location, for a tool invoked from a subdirectory or one that prints absolute container paths.