-
Notifications
You must be signed in to change notification settings - Fork 444
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
Cancel outstanding tasks on document edit in the language server #2648
Conversation
inductive KernelException | ||
0 | unknownConstant (env : Environment) (name : Name) | ||
1 | alreadyDeclared (env : Environment) (name : Name) | ||
2 | declTypeMismatch (env : Environment) (decl : Declaration) (givenType : Expr) | ||
3 | declHasMVars (env : Environment) (name : Name) (expr : Expr) | ||
4 | declHasFVars (env : Environment) (name : Name) (expr : Expr) | ||
5 | funExpected (env : Environment) (lctx : LocalContext) (expr : Expr) | ||
6 | typeExpected (env : Environment) (lctx : LocalContext) (expr : Expr) | ||
7 | letTypeMismatch (env : Environment) (lctx : LocalContext) (name : Name) (givenType : Expr) (expectedType : Expr) | ||
8 | exprTypeMismatch (env : Environment) (lctx : LocalContext) (expr : Expr) (expectedType : Expr) | ||
9 | appTypeMismatch (env : Environment) (lctx : LocalContext) (app : Expr) (funType : Expr) (argType : Expr) | ||
10 | invalidProj (env : Environment) (lctx : LocalContext) (proj : Expr) | ||
11 | other (msg : String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This listing was outdated and is replicated below
|
Amazingly, the extra result allocation seems to have triggered a mathlib heartbeat timeout
!bench |
Here are the benchmark results for commit 61b2bfa. |
@Kha This was reverted due to crashes, and I have a worker stack trace at https://gist.github.com/collares/ae3a8d5b5f7c6976b8d46b5bfb6e945b (commit d15a0a4, Debug). It seems like the kernel calls lean4/src/kernel/for_each_fn.cpp Lines 65 to 66 in d15a0a4
|
FWIW, #2036 (comment) |
Dramatically reduces system load and increases responsiveness of the language server. In my tests, I was not able to get the server above 100% CPU anymore.
The
check_system
calls inside pure Lean functions are a bit problematic. I did not find any process terminations from cancellation anymore after blacklisting two of them in the last commit but I may have missed some of them.