-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix a bug how missing values in ConfigurationItem are handled #416
Conversation
Codecov Report
@@ Coverage Diff @@
## master #416 +/- ##
=========================================
Coverage ? 33.57%
=========================================
Files ? 22
Lines ? 1236
Branches ? 0
=========================================
Hits ? 415
Misses ? 821
Partials ? 0
Continue to review full report at Codecov.
|
src/protocol/configuration.jl
Outdated
function JSON.lower(a::ConfigurationItem) | ||
d = Dict{String, Any}() | ||
|
||
a.scopeUri!==nothing && d["scopeUri"] = a.scopeUri |
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.
Have to enclose the assignment in parentheses &&
or ||
for this to be valid syntax:
julia> d = Dict()
Dict{Any,Any} with 0 entries
julia> true && d[1] = 5
ERROR: syntax: invalid assignment location "true && d[1]"
Stacktrace:
[1] top-level scope at REPL[5]:1
[2] run_backend(::REPL.REPLBackend) at /home/adam/.julia/packages/Revise/439di/src/Revise.jl:975
[3] (::getfield(Revise, Symbol("##80#82")){REPL.REPLBackend})() at ./task.jl:268
julia> true && (d[1] = 5)
5
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.
Oh man, how embarrassing :) New push that hopefully fixes that!
I can't get this to successfully import (d9772fb), so I can't test. Looks like this is the same reason CI is failing: julia> using LanguageServer
[ Info: Precompiling LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7]
ERROR: LoadError: UndefVarError: Scope not defined
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/adam/.julia/packages/StaticLint/FuPWe/src/StaticLint.jl:5
ERROR: LoadError: Failed to precompile StaticLint [b3cc710f-9c33-5bdb-a03d-a94903873e97] to /home/adam/.julia/compiled/v1.2/StaticLint/FgruE.ji.
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/adam/.julia/packages/LanguageServer/x9ZqS/src/LanguageServer.jl:12
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to /home/adam/.julia/compiled/v1.2/LanguageServer/ite7n.ji. EDIT: this bug seems to have been introduced by [email protected]. Downgrading to [email protected], LanguageServer imports fine. |
I am unable to test this due to julia-vscode/SymbolServer.jl#57. EDIT: I can run it on scripts but not projects. Can confirm that this fixes #418. |
Fixes #416.
@non-Jedi does this work now for you?