-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
fix: remove the Indexing
progress message when exeption in withHieDb
#3610
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 |
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?
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. |
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 <me@michaelpj.com>
If any exception was happening in
withHieDb
, thepost
action was never called, leading to a staleIndexing
message in the client.By using
bracket
, we ensure that thepost
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.See #2931 for an example when an exception can happen during the indexing.