-
Notifications
You must be signed in to change notification settings - Fork 81
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
interperet nothin
-> false in client config response handling
#696
Conversation
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.
Looks good to me, @non-Jedi, do you also want to take a look?
src/requests/workspace.jl
Outdated
@@ -103,9 +103,8 @@ function request_julia_config(server::LanguageServerInstance) | |||
])) | |||
|
|||
server.format_options = DocumentFormat.FormatOptions(response[1:11]...) | |||
server.runlinter = something(response[22], true) | |||
server.runlinter = something(response[22], false) |
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.
Well crap. Is it just this setting that vscode sends null
for false
on, or is it all of them? I'll go reread the spec, but this smells like a spec-violation on the part of vscode.
Per the spec, a null value means that the client is unable to provide a setting which is semantically different from providing a
Also note that this change by itself doesn't solve julia-vscode/julia-vscode#1184 since that issue is about "julia.lint.call" rather than "julia.lint.run". So:
|
One option that wouldn't break defaults for non-vscode clients would be to change all boolean config fields to be |
This still needs to be verified by another vscode user I think. |
Thanks - I hadn't pushed a commit |
Are you unable to replicate it locally? |
I see this behaviour on my vscode setup, not sure anyone else has confirmed it on theirs? (specifically the returning of nulls instead of false) |
I'd rather we changed it to "on"/"off" to be a bit more transparent - is that ok with you? |
That's fine with me. |
Should we maybe first check with the MS guys whether there is some other way around this? If our current understanding of the situation is correct, I agree that "on/off" is a better option, but this is frustrating that one can't just use a Changing all of these settings to "on/off" is also annoying because every user who adjusted those settings will have to update... |
Just want to confirm that for me this PR fixes the inability to turn linting off that I mentioned on Slack and is mentioned in julia-vscode/julia-vscode#1184. Would be great to get a fix in if possible, since this is a real "paper cut" bug I think alot of new users would probably hit. |
OK, this definitely looks like a bug on the vscode side of things. I'm going to close this and put forward a pair of PRs for LanguageServer and julia-vscode that would move these configurations from bools to "on"/"off". This feels like something that should be addressed rather quickly and I don't have a sense of how quickly changes would make their way through upstream. It's then an easy change to revert back when the bug is addressed. Thoughts? |
@ZacLN why not just use this branch to do a release for vscode (and fix the obviously super obnoxious ux of not being able to turn off configuration options) and then wait and see if the upstream bug is quickly fixed before you next want to do a real LanguageServer.jl release? That way we potentially avoid people having to redo their config. |
I'm amenable to that, @davidanthoff ? |
Yes, I would much prefer that we stick with Normally up stream is super fast in addressing stuff. I'm sure if we were to open a PR ourselves that fixes the problem, it could be shipped very quickly. Also, because this is a bug in the Also very much agree that we should ship this ASAP! |
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.
Let’s merge this, just to fix this for now and so that we can push out a new release soon.
I think @non-Jedi's proposal was that we use this branch in the snapshot for a julia-vscode release rather than merging this |
I don’t think we can ship a branch, there is a fair bit of tooling in place on the extension side that assumes we ship Can we put the content of this branch behind an But in any case, we should ship something ASAP, right now users on the released version can’t change any of these settings and we also have crash reports because somewhere there is a call to a method with the wrong number of args in the currently shipping version. @ZacLN let me know if you want me to do something about this PR if you are busy! |
OK, I've amended as above |
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.
Yeah!
julia-vscode/julia-vscode#1184 (comment)
This ignores the SL/DF-Options constructors that have been recently - ths seems like an LSP specific interface so shouldn't really sit in those packages.