-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
only send format editings when necessary #420
Conversation
This change is unnecessary and will also brick some clients that will wait for a format response they will never receive. The other alternatives are to send an empty or error response, but those would break clients too, thus the status quo is better. :) |
According to the spec, if there's nothing change, we could return |
That would work, but I still do not see why this is a necessary change. Is there an example of where the status quo behavior is problematic? |
I found this issue with my |
I see! If you make format return a |
If the original document is same as the formatted one, there's no need to send the unchanged document's content back which will make the client confused. Signed-off-by: Tw <tw19881113@gmail.com>
I just rebased the patch onto the latest master and change the behavior to respond with a null result when no changes. |
LGTM, thank you so much for your contribution! Hopefully this fixes the problems you and others were facing with zls in acme. :) |
Yeah, feel happy if my fix could help others. |
If the original document is same as the formatted one, there's no need to send the unchanged
document's content back which will make the client confused.