leanprover / leanprover/lean4

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

Open
#7,701 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the VSCode F8 behavior and the lake output shown in the hover when B.lean imports A.lean. Trace how the underlying error file and location are represented, then determine how navigation can open A.lean at that error. Done means jumping directly from the imported-file diagnostic to the underlying error instead of stopping at B.lean.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.