-
-
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
API: drop None rather than unset in JSON response #236
Conversation
88c4c2e
to
fb73307
Compare
fb73307
to
f53d661
Compare
@MatejKastak and @dimbleby: would you like to comment on this fix? |
Looks familiar! sure, seems ok to me |
Great! Thanks for working on this. I also approve and I don't have any other comments. |
@dimbleby haha, yes you're fix 😏 Thank you @MatejKastak Thank you too, and thanks for waiting Just waiting for the review, then LGTM 🚀 |
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, just one question
tests/lsp/test_progress.py
Outdated
CODE_LENS, | ||
CodeLensOptions( | ||
resolve_provider=False, | ||
work_done_progress='token' |
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.
Any reason why PROGRESS_TOKEN
is not used 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.
Good spot!
Can you also add something like: Fixes #231 in the description so that this issue gets automatically fixed ? |
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.
Good to see this :)
CONTRIBUTORS.md
Outdated
@@ -15,3 +15,4 @@ | |||
- [yorodm](https://github.com/yorodm) | |||
- [bollwyvl](https://github.com/bollwyvl) | |||
- [Dillan Mills](https://github.com/DillanCMills) | |||
- [Tom BH](https://github.com/tombh) |
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.
It seems it was not always followed earlier either, but this list is supposed to be sorted in alphabetical order ( https://github.com/openlawlibrary/pygls/blob/f53d6615e4561184b393d4b2c6b5629f31f33dbb/CONTRIBUTORS.md#contributors-alphabetical )
Oh sorry, I did not realize the issue was already mentioned in the pull request description 😖. That said, you can still change to using a keyword like Fixes if you wish, because it is understood by github ( https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword ) |
@tombh I don't think that this issue is specific to this PR, but Python 3.6 Windows build is getting stuck. Would be good to know what is causing this even though we are planning to drop Python 3.6 support |
b1e937a
to
ddde14f
Compare
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)
ddde14f
to
45879b4
Compare
@perrinjerome I added the "Fixes" to the commit message and changed the contributors order. Thanks @renatav Yes I saw that, and have had a play with it, it's actually intermittent and I've even seen it affect almost all items in the matrix, any version or OS, but yes more often Windows/Python 3.6. There's evidence of it happening before this PR, so as you say I don't think it's being introduced with this code. There's no lock file for the dependencies, so the only thing I can think is that a minor change in a dependent package has caused this. Which leads me to think that our next step should be #229, #223 and of course #235. So I vote for merging this PR as all the tests are passing, just rarely without some failure from the flakey bug. |
@tombh We usually use fixes in the PR comment, not sure that commit message with fixes will automatically close issues. I'll approve the PR |
This undoes the change in openlawlibrary#236 as well as bring back the explicit setting of non `None` default fields as suggested in [1] This commit also introduces serialization test cases that hopefully cover all the scenarios raised in openlawlibrary#245, openlawlibrary#231 and openlawlibrary#198 [1]: openlawlibrary#245 (comment)
This undoes the change in openlawlibrary#236 as well as bring back the explicit setting of non `None` default fields as suggested in [1] This commit also introduces serialization test cases that hopefully cover all the scenarios raised in openlawlibrary#245, openlawlibrary#231 and openlawlibrary#198 [1]: openlawlibrary#245 (comment)
This undoes the change in openlawlibrary#236 as well as bring back the explicit setting of non `None` default fields as suggested in [1] This commit also introduces serialization test cases that hopefully cover all the scenarios raised in openlawlibrary#245, openlawlibrary#231 and openlawlibrary#198 [1]: openlawlibrary#245 (comment)
This undoes the change in #236 as well as bring back the explicit setting of non `None` default fields as suggested in [1] This commit also introduces serialization test cases that hopefully cover all the scenarios raised in #245, #231 and #198 [1]: #245 (comment)
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 monthslater @dimbleby suggested that
exclude_none=True
would also fix theissue[1]. Considering those 2 suggestions, let's replace
exclude_unset=True
withexclude_none=True
.Code review checklist (for code reviewer to complete)