-
-
Notifications
You must be signed in to change notification settings - Fork 410
fix: remove the Indexing progress message when exeption in withHieDb
#3610
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
Conversation
|
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
left a comment
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.
LGTM!
What do you think about adding your reasoning to the code here?
wz1000
left a comment
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 seems like a good idea
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.
9014f48 to
beffb29
Compare
I've added a comment. |
fendor
left a comment
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.
LGTM :)
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 <[email protected]>
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.