-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Progress notifications does not contain the field kind
#217
Closed
Conversation
This file contains 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
MatejKastak
force-pushed
the
progress-not-shown
branch
from
May 22, 2022 10:24
83a9939
to
4244ba2
Compare
Ah this is same as #231 |
tombh
added a commit
that referenced
this pull request
May 31, 2022
This addresses #217 and #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
8 tasks
tombh
added a commit
that referenced
this pull request
May 31, 2022
This addresses #217 and #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
tombh
added a commit
that referenced
this pull request
May 31, 2022
This addresses #217 and #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
tombh
added a commit
that referenced
this pull request
Jun 1, 2022
Fixes #217, #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
tombh
added a commit
that referenced
this pull request
Jun 1, 2022
Fixes #217, #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
tombh
added a commit
that referenced
this pull request
Jun 1, 2022
Fixes #217, #231. I am still new to the project, so I may not have the full story. But it started with a somewhat far-reaching merge to remove defaults from all serialisable fields in the API: #198. This had the knock-on effect of regressing progress notifications, as reported by @MatejKastak in #217. One of their suggestions is to not use `exclude_unset=True`. Some months later @dimbleby suggested that `exclude_none=True` would also fix the issue[1]. Considering those 2 suggestions, let's replace `exclude_unset=True` with `exclude_none=True`. 1. #198 (comment)
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.
WorkDoneProgress*
fieldskind
are excluded when sending to client(editor)WorkDoneProgressBegin
has fieldkind
with default value'begin'
@ codejson
exclude_unset
causes the object to ignorekind = 'begin'
since it was initialized with default value -- docsLogs
Python code here in the example json-server:
Generates the following. Notice how
WorkDoneProgressBegin
containskind='begin'
(line 1), however the data send does not contain this field (params->value->kind?
) (line 2).Solution?
WorkDoneProgress*
messages are affected by this issuekind
explicitly, like this PR showsexclude_unset
option, however this might cause more problems (I am sure there was a reason to put this option there in the first place)Repro
After this PR:
Code review checklist (for code reviewer to complete)