fix: remove the Indexing progress message when exeption in withHieDb#3610
Merged
Conversation
Collaborator
Author
|
I tried this code for one week at work (super large haskell codebase (hls takes 3 to 5 minutes to start), 2k+ modules, 20 devs) and the stuck |
fendor
requested changes
May 28, 2023
fendor
left a comment
Collaborator
There was a problem hiding this comment.
LGTM!
What do you think about adding your reasoning to the code here?
wz1000
approved these changes
May 28, 2023
wz1000
left a comment
Collaborator
There was a problem hiding this comment.
This seems like a good idea
wz1000
reviewed
May 28, 2023
If any exception was happening in `withHieDb`, the `post` action was never called, leading to a stale `Indexing` message in the client. By using `bracket`, we ensure that the `post` message is called in the event of an exception, cleaning the confusing message in the client. It does not change the well behaving of the indexing (i.e. if it was crashing, it is still crashing), but at least user won't be confused by a stale `Indexing` message.
guibou
force-pushed
the
fix_indexing_message_progress
branch
from
May 28, 2023 12:23
9014f48 to
beffb29
Compare
Collaborator
Author
I've added a comment. |
wz1000
reviewed
May 28, 2023
michaelpj
enabled auto-merge (squash)
June 1, 2023 15:33
smunix
pushed a commit
to smunix/haskell-language-server
that referenced
this pull request
Jun 10, 2023
haskell#3610) If any exception was happening in `withHieDb`, the `post` action was never called, leading to a stale `Indexing` message in the client. By using `bracket`, we ensure that the `post` message is called in the event of an exception, cleaning the confusing message in the client. It does not change the well behaving of the indexing (i.e. if it was crashing, it is still crashing), but at least user won't be confused by a stale `Indexing` message. Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If any exception was happening in
withHieDb, thepostaction was never called, leading to a staleIndexingmessage in the client.By using
bracket, we ensure that thepostmessage is called in the event of an exception, cleaning the confusing message in the client.It does not change the well behaving of the indexing (i.e. if it was crashing, it is still crashing), but at least user won't be confused by a stale
Indexingmessage.See #2931 for an example when an exception can happen during the indexing.