Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor diagnostic errors to use miette. #12

Merged
merged 3 commits into from
Nov 25, 2023
Merged

Refactor diagnostic errors to use miette. #12

merged 3 commits into from
Nov 25, 2023

Conversation

peterhuene
Copy link
Member

This commit refactors the lexer/ast/resolution errors to be based on miette
and removes the custom error formatting implementation.

The relevant error types also no longer have a lifetime parameter and own the
data.

Test baselines have been updated to the new error format.

The Span type has been replaced with SourceSpan from miette.

@peterhuene
Copy link
Member Author

Only the last commit is relevant; I'll rebase once #11 is merged.

Copy link
Collaborator

@fibonacci1729 fibonacci1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! TIL about miette which is awesome.

This commit refactors the lexer/ast/resolution errors to be based on `miette`
and removes the custom error formatting implementation.

The relevant error types also no longer have a lifetime parameter and own the
data.

Test baselines have been updated to the new error format.

The `Span` type has been replaced with `SourceSpan` from `miette`.
The error now includes the previous span.
@peterhuene peterhuene merged commit 56d0e15 into main Nov 25, 2023
4 checks passed
@peterhuene peterhuene deleted the miette branch November 25, 2023 07: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