Skip to content

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant