-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
There is an issue at display time with Diagnostic message, I will elaborate on that.
Problem:
If a publishDiagnostic message is sent with the same properties, exactly the same, because we change something in the document but not fixing the errors, then nothing is supposed to change, that`s right and it is working out of the box, normal behaviour until the error message is new, contains the same properties and should be displayed on the same position. The issue here is that the position is shifting with the old wrong token and not with the new one as we can see in the following gif:
My diagnostic message is always the same because of the same wrong token position.
I think that the problem is coming from extHostDiagnostics.ts class which can be accesed during debug by calling setDiagnostics(uri, diagnostics) from client.js, the boolean hasChanged is exiting the condition on line 118, which seems logic, but not in this case.
Solution:
I was thinking what can be one of the simplest solution, bare in mind that I am not a typescript person, so a refresh of the Marker seems acceptable; the second but more complex solution from many points of view is to add a new property to Diagnostic, like a message id.
