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

[Draft] Anchor: highlighting error locations #1679

Draft
wants to merge 1 commit into
base: anchor
Choose a base branch
from

Conversation

asolove
Copy link

@asolove asolove commented Dec 31, 2022

I would love some help understanding the error message tree that comes back from the compiler so that I can improve a couple cases where the Anchor UI shows message that don't clearly highlight the relevant source location.

Here's one case where the error has a loc but not a highlight and so it was showing very little detail on where the actual problem was. I've temporarily just copied a lot of the highlight-related code into this case, but I imagine there is a much better way to do this, either by changing the compiler error to emit a highlight in this case, or by some broader refactoring to how Anchor handles displaying srclocs.

Preview

before after
image

@asolove asolove changed the base branch from horizon to anchor December 31, 2022 20:30
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.

1 participant