I’ve been using the VS code extension 0.14.0-beta3 for 4 or 5 days, and it’s been running very well. But today I’m seeing a possible bug.
I have a short script that returns a Dictionary. Running it from the REPL works fine - the Dictionary is displayed in the REPL. But running it by hitting F5 whilst the script is the active tab does not work, things seems to be failing at the point where the Dictionary is being displayed in the REPL. The call stack mentions “vscodeserver” a fair amount…
Running from the REPL:
julia> include("XVA/src/precompile.jl")
Executing precompile file
<ETC ETC>
OrderedCollections.OrderedDict{String,Any} with 8 entries:
"Trades" => OrderedCollections.OrderedDict{Any,Any}("TradeID"=>["T000001", "T000002", "T000003", "T000004", "T000005"],"
<ETC ETC>
Running by hitting F5:
Executing precompile file
<ETC ETC>
OrderedCollections.OrderedDict{String,Any} with 8 entries:ERROR: MethodError: no method matching size(::WeakRefStrings.StringArray{String,1})
The applicable method may be too new: running in world age 26877, while current world is 27662.
Closest candidates are:
size(::WeakRefStrings.StringArray) at C:\Users\Philip\.julia\packages\WeakRefStrings\lqf5B\src\WeakRefStrings.jl:193 (method too new to be called from this world context.)
size(::AbstractArray{T,N}, ::Any) where {T, N} at abstractarray.jl:38
size(::BitArray{1}) at bitarray.jl:77
...
Stacktrace:
[1] length at .\abstractarray.jl:206 [inlined]
[2] isempty(::WeakRefStrings.StringArray{String,1}) at .\abstractarray.jl:917
[3] typeinfo_prefix(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::WeakRefStrings.StringArray{String,1}) at .\arrayshow.jl:480
[4] show_vector(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::WeakRefStrings.StringArray{String,1}, ::Char, ::Char) at .\arrayshow.jl:432 (repeats 2 times)
[5] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::WeakRefStrings.StringArray{String,1}) at .\arrayshow.jl:418
[6] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Pair{String,WeakRefStrings.StringArray{String,1}}) at .\show.jl:604
[7] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::OrderedCollections.OrderedDict{Any,Any}) at .\dict.jl:38
[8] #sprint#339(::IOContext{REPL.Terminals.TTYTerminal}, ::Int64, ::typeof(sprint), ::Function, ::OrderedCollections.OrderedDict{Any,Any}) at .\strings\io.jl:103
[9] (::Base.var"#kw##sprint")(::NamedTuple{(:context, :sizehint),Tuple{IOContext{REPL.Terminals.TTYTerminal},Int64}}, ::typeof(sprint), ::Function, ::OrderedCollections.OrderedDict{Any,Any}) at .\none:0
[10] show(::IOContext{REPL.Terminals.TTYTerminal}, ::MIME{Symbol("text/plain")}, ::OrderedCollections.OrderedDict{String,Any}) at .\show.jl:101
[11] display(::REPL.REPLDisplay, ::MIME{Symbol("text/plain")}, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\REPL\src\REPL.jl:132
[12] display(::REPL.REPLDisplay, ::Any) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\REPL\src\REPL.jl:136
[13] display(::Any) at .\multimedia.jl:323
[14] (::Main._vscodeserver.var"#9#12"{String,Int64,Int64,String})() at c:\Users\Philip\.vscode\extensions\julialang.language-julia-0.14.0-beta.3\scripts\terminalserver\terminalserver.jl:160
[15] withpath(::Main._vscodeserver.var"#9#12"{String,Int64,Int64,String}, ::String) at c:\Users\Philip\.vscode\extensions\julialang.language-julia-0.14.0-beta.3\scripts\terminalserver\repl.jl:62
[16] (::Main._vscodeserver.var"#8#11"{String,Int64,Int64,String})() at c:\Users\Philip\.vscode\extensions\julialang.language-julia-0.14.0-beta.3\scripts\terminalserver\terminalserver.jl:156
[17] hideprompt(::Main._vscodeserver.var"#8#11"{String,Int64,Int64,String}) at c:\Users\Philip\.vscode\extensions\julialang.language-julia-0.14.0-beta.3\scripts\terminalserver\repl.jl:28
[18] macro expansion at c:\Users\Philip\.vscode\extensions\julialang.language-julia-0.14.0-beta.3\scripts\terminalserver\terminalserver.jl:152 [inlined]
[19] (::Main._vscodeserver.var"#7#10")() at .\task.jl:333
julia>
julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 8
JULIA_EDITOR = "C:\Users\Philip\AppData\Local\Programs\Microsoft VS Code\Code.exe"