quarto-error-reporting 0.2.0

Structured, source-aware diagnostics with pluggable rendering (ariadne or annotate-snippets) and a pluggable error-code catalog.
Documentation
# This crate is also the workspace root. The only extra member is `xtask`,
# the local CI runner (`cargo xtask verify`) — see `.cargo/config.toml`.
# `xtask` has `publish = false` and lives in its own subdirectory, so it is
# automatically excluded from this crate's published artifact.
[workspace]
members = ["xtask"]
resolver = "3"

[package]
name = "quarto-error-reporting"
version = "0.2.0"
edition = "2024"
authors = ["Posit Software, PBC"]
license = "MIT"
description = "Structured, source-aware diagnostics with pluggable rendering (ariadne or annotate-snippets) and a pluggable error-code catalog."
repository = "https://github.com/posit-dev/quarto-error-reporting"
homepage = "https://github.com/posit-dev/quarto-error-reporting"
readme = "README.md"
keywords = ["diagnostics", "error-reporting", "ariadne", "annotate-snippets"]
categories = ["development-tools", "rust-patterns"]

# Keep internal tooling and planning docs out of the published artifact.
# (`xtask/` is a nested package and is excluded automatically.)
exclude = [".cargo", ".claude", ".github", "claude-notes", "CLAUDE.md"]

[dependencies]
# Source location tracking (published leaf crate).
quarto-source-map = "0.1.0"

# Error reporting — source-context snippet renderers. Both are optional
# and feature-gated so consumers can pick a rendering style (or compile
# with neither, falling back to the structured tidyverse text path).
ariadne = { version = "0.6", optional = true }
annotate-snippets = { version = "0.12", optional = true }
thiserror = "2.0"

# Serialization
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"

# JSON Schema generation for the wire format, behind the `json` feature.
schemars = { version = "1.2.1", optional = true }

# URL handling for file:// hyperlinks
url = "2.5"

[features]
# `ariadne` is the historical default renderer; keep it on by default so
# existing consumers see no change. `annotate-snippets` (rust-lang's
# diagnostic style) is opt-in while we evaluate it. They are not mutually
# exclusive — enable both to switch renderers at runtime via
# `DiagnosticMessage::to_text_with_renderer`.
default = ["ariadne"]
ariadne = ["dep:ariadne"]
annotate-snippets = ["dep:annotate-snippets"]

# The `json.rs` wire shape (JsonDiagnostic etc.) and its `schemars`
# dependency are opt-in. Default-off so a consumer that only needs the
# diagnostic/builder/render API gets a leaner build with no schemars.
json = ["dep:schemars"]