-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve error handling for Coq internal errors #91
Improve error handling for Coq internal errors #91
Comments
Postponed as I forgot of an example where this bad behavior occurs. |
Aren't there known ways to get anomlies just by searching Coq issues? |
Also just load a plugin which raises an exception if you want to test. |
Good ideas! Thanks. |
I know have a precise description of the problem: If we are serving a The correct behavior would be I guess to cancel the request? But @artagnon 's patch to replace Also, we should protect the calls to |
`Coq.Init` will actually often `Require` Coq's prelude and perform arbitrary actions, we now reflect this on the type. We still have a way to improve here, but for now the code is clear and the server will rarely crash. Closes #91
`Coq.Init` will actually often `Require` Coq's prelude and perform arbitrary actions, we now reflect this on the type. We still have a way to improve here, but for now the code is clear and the server should not crash anymore unless there is a real bug in coq-lsp. Closes #91
Indeed I didn't realize that goal printing could raise an anomaly, due to setting state; thus #91 is not fully fixed. So we go full principled and make `Protect` mandatory on the exported APIs. TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Indeed I didn't realize that goal printing could raise an anomaly, due to setting state; thus #91 is not fully fixed. So we go full principled and make `Protect` mandatory on the exported APIs. TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Indeed I didn't realize that goal printing could raise an anomaly, due to setting state; thus #91 is not fully fixed. So we go full principled and make `Protect` mandatory on the exported APIs. TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Indeed I didn't realize that goal printing could raise an anomaly, due to setting state; thus #91 is not fully fixed. So we go full principled and make `Protect` mandatory on the exported APIs. TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Indeed I didn't realize that goal printing could raise an anomaly, due to setting state; thus #91 is not fully fixed. So we go full principled and make `Protect` mandatory on the exported APIs. TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: - calls to admit (this is tricky due to error recovery needing rework to fully account for execution) - calls to `Printer`
Work on tricky issues made me realize that we don't handle anomalies and Coq errors still in the best way, thus #91 is not really solved. There are 2 issues this PR solves: - goal printing can raise an anomalies and errors, due to setting state and printing, - it is safer to stop checking and set the document to failed when an anomaly happens (tho we could make this configurable). Thus, we go full principled in terms of API and make `Protect` mandatory on the exported APIs from `coq` library. We also introduce a `Failed` state that prevents further checking of that document without having finished it. Really fixes #91, and a step towards #153 TODO: protect calls to admit, but we leave this for a further PR as it is quite tricky due to error recovery needing rework to fully account for `Protect.R` results.
CHANGES: ---------------------- - Much improved handling of Coq fatal errors, the server is now hardened against them (@ejgallego, ejgallego/coq-lsp#155, ejgallego/coq-lsp#157, ejgallego/coq-lsp#160, fixes ejgallego/coq-lsp#91) - `coq-lsp` now follows the LSP specification regarding initialization strictly (@ejgallego, ejgallego/coq-lsp#168) - New setting for goals to be updated when the selection changes due to a command; this makes VsCodeVim cursor tracking work; thanks to Cactus (Anton) Golov for detailed bug reporting and testing (@ejgallego, @jesyspa, ejgallego/coq-lsp#170, fixes ejgallego/coq-lsp#163) - `coq-lsp` will now warn the user when two files have been opened simultaneously and the parser may go into a broken state :/ (@ejgallego, ejgallego/coq-lsp#169) - Implement request postponement and cancellation. Thus `documentSymbols` will now be postponed until the document is ready, (@ejgallego, ejgallego/coq-lsp#141, ejgallego/coq-lsp#146, fixes ejgallego/coq-lsp#124) - Protocol and VS Code interfaces now support shelved and given_up goals (@ejgallego, ejgallego/coq-lsp#175) - Allow to postpone requests to wait for data to become available on document points; this is implemented to provide a nicer "show goals while I type" experience. Client default has been changed to "show goals on mouse, click, typing, and cursor movement) (@ejgallego, ejgallego/coq-lsp#177, ejgallego/coq-lsp#179) - Store stats per document (@ejgallego, ejgallego/coq-lsp#180, fixes ejgallego/coq-lsp#173)
If we get an anomaly from Fleche (usually from Coq), the way the server behaves is far from ideal.
We are also not very well protected for exceptions happening in the request code.
The text was updated successfully, but these errors were encountered: