Skip to content
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

Merged
merged 4 commits into from
Dec 2, 2019

Conversation

davidanthoff
Copy link
Member

@davidanthoff davidanthoff commented Nov 5, 2019

Fixes #416.

@non-Jedi does this work now for you?

@codecov
Copy link

codecov bot commented Nov 5, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@5478c10). Click here to learn what that means.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #416   +/-   ##
=========================================
  Coverage          ?   33.57%           
=========================================
  Files             ?       22           
  Lines             ?     1236           
  Branches          ?        0           
=========================================
  Hits              ?      415           
  Misses            ?      821           
  Partials          ?        0
Impacted Files Coverage Δ
src/protocol/configuration.jl 97.14% <88.88%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5478c10...d9772fb. Read the comment docs.

function JSON.lower(a::ConfigurationItem)
d = Dict{String, Any}()

a.scopeUri!==nothing && d["scopeUri"] = a.scopeUri
Copy link
Member

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

Copy link
Member Author

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!

@non-Jedi
Copy link
Member

non-Jedi commented Dec 2, 2019

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.

@non-Jedi
Copy link
Member

non-Jedi commented Dec 2, 2019

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.

@davidanthoff davidanthoff merged commit 0e35b77 into master Dec 2, 2019
@davidanthoff davidanthoff deleted the fix-configitem-bug branch December 2, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants