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

[GnoVM] Make error line clickable #3517

Open
leohhhn opened this issue Jan 15, 2025 · 2 comments
Open

[GnoVM] Make error line clickable #3517

leohhhn opened this issue Jan 15, 2025 · 2 comments
Labels
help wanted Want to contribute? We recommend these issues.

Comments

@leohhhn
Copy link
Contributor

leohhhn commented Jan 15, 2025

Description

Would be cool and good for UX to make the error line clickable so it takes you to the location of the error, such as here:

❯ gno test . -v 
.: test pkg: panic: gno.land/r/gov/dao/v2/render.gno:45:12: name ResolveAddress not declared:
--- preprocess stack ---

Do you think this is feasible/practical?

@thehowl
Copy link
Member

thehowl commented Jan 15, 2025

I'm not sure how editors make it work honestly; but I think it needs to be either 1. at the beginning of a newline or 2. an actual relative file, rather than being a package path. Would be good to find some references to how to actually make this "clickable" in mainstream editors.

@notJoon
Copy link
Member

notJoon commented Jan 16, 2025

Usually, using the format filename:line_number:column_number allows the IDE to process logs through parsing internally.

Or, we can also use OSC 81 hyperlink escape sequences enables more explicit handling. This method can also be work over a external terminal, such as iTerm.

For example, it takes the following form (we can use other schemes also):

\033]8;;file://path\007text\033]8;;\007

However, I believe that in most cases, simply applying the first method with a consistent format should be sufficient without any issues.

Footnotes

  1. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

@leohhhn leohhhn added the help wanted Want to contribute? We recommend these issues. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Want to contribute? We recommend these issues.
Projects
Status: Triage
Development

No branches or pull requests

3 participants