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

feature request: "go to next problem" should work on errors in imported files #396

Open
kim-em opened this issue Feb 15, 2024 · 1 comment

Comments

@kim-em
Copy link
Contributor

kim-em commented Feb 15, 2024

Suppose A.lean has an error, and B.lean imports A.lean.

If I have only B.lean open in VSCode, then I don't really get an actionable error. Jump to next error (F8) only takes me to the first line of B.lean, and then I have to read the lake output in the hover, identify the relevant file, and then open that.

It would be great if there was a convenient way to directly open A.lean at the underlying error.

I'm not certain that it should be F8 that does this. If it is, then Mario suggests that perhaps we could place the error squiggle from A.lean in B.lean: then F8 would hopefully open A.lean.

@kim-em kim-em transferred this issue from leanprover/lean4 Feb 15, 2024
@antonkov
Copy link

antonkov commented Feb 19, 2024

Probably not fully resolving this, but DiagnosticRelatedInformation can be useful to point to the underlying error. It's displayed in the hover message as the link which opens the related file on click
Screenshot 2024-02-19 at 02 36 59

My initial thought is to patch interactiveDiag to include DiagnosticRelatedInformation somewhere in compileHeader.
@mhuisi do you think it's reasonable to look at as a first issue? Also please let me know if my suggestion is completely off or you have a better approach in mind :) otherwise happy to look more into that issue

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

No branches or pull requests

2 participants