leanprover-community / leanprover-community/lean
Lean server produces hundreds of "checking import for sorry" tasks
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 434
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
I am using Lean (version 3.16.5, commit 101e2ca571cc, Release).
I am using vscode 0.15.15, commit 7b5d8717f79d.
I think it is something weird about the project I am working on because I can't repro in mathlib.
I will try to get it to repro on a minimal project and post here.
If I am working on a file in a project and then type a lot. The task count will increase roughly in proportion to the number of document edits I have made, CPU is at 100% and orange gutter bars appear and do not go away until all of the hundreds of tasks are completed.
The server comms look like this:

Note the 237 tasks.
It happens even if infoview is closed.
A workaround is to restart the server, then the task completes quickly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the task buildup with Lean 3.16.5 and VS Code 0.15.15, comparing the affected project with mathlib. Inspect the server communications while making repeated edits, and use the restart workaround as a comparison; done means edits no longer create hundreds of lingering "checking import for sorry" tasks or sustained CPU usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100