Skip to content

Improve the low-level API for non-fatal diagnostics#13

Merged
Georgiy-Tugai merged 3 commits into
forest-rs:mainfrom
Georgiy-Tugai:diagnostics-sink
Jun 4, 2026
Merged

Improve the low-level API for non-fatal diagnostics#13
Georgiy-Tugai merged 3 commits into
forest-rs:mainfrom
Georgiy-Tugai:diagnostics-sink

Conversation

@Georgiy-Tugai
Copy link
Copy Markdown
Collaborator

Exposing the underlying Option<&mut dyn DiagnosticSink> through format_to allows callers to specify whether they care about diagnostics.

Georgiy Tugai added 3 commits June 4, 2026 20:16
…at_to

this allows callers who do not care about diagnostics to avoid (some of) the costs involved
… no diagnostic sink

We do need to know if there were *any* errors for semantic handling, but we don't need to know which ones unless we are reporting them.
@Georgiy-Tugai Georgiy-Tugai merged commit 8fd152f into forest-rs:main Jun 4, 2026
15 checks passed
@Georgiy-Tugai Georgiy-Tugai deleted the diagnostics-sink branch June 4, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants