Using VSCode and its linter on my project

Hi,
I am trying to use Julia’s vscode plugin to develop my AlphaZero.jl package but I am running into a few bumps.

My repo is organized in a pretty standard way: I have a src folder that defines the AlphaZero module and a test folder with tests. I also have a scripts folder that provides examples and utilities, which rely on the AlphaZero module.

The linter and code linking mostly work on files within the src directory, but it does not work on tests and scripts (See screenshot). This is surprising as I can execute a script using the “Eval file” functionality without problem. How can I make sure that the AlphaZero module is recognized when editing my tests and my scripts?

There are two other things I wanted to mention.

Warnings when starting the language server

First, when I started the language server for the first time, I got some warinings:

[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at '/home/jonathan/.config/Code/User/globalStorage/julialang.language-julia/symbolstorev2'.
┌ Warning: CUDA not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-0.16.11/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: Parsers not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-0.16.11/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: QuadGK not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-0.16.11/scripts/packages/SymbolServer/src/SymbolServer.jl:190
┌ Warning: OpenBLAS_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-0.16.11/scripts/packages/SymbolServer/src/SymbolServer.jl:190
...

Are these anything to be worried about?

Limitations of the Linter

The linter also seems to be missing some references within my package sources. For example, editing src/AlphaZero.jl:

This may be due to me doing some conditional code inclusion such as the following in src/AlphaZero.jl

const USE_KNET_FOR_NETLIB = true # The Flux netlib is currently broken

if USE_KNET_FOR_NETLIB
  @eval begin
    include("networks/knet.jl")
    using .KNets
  end
else
  @eval begin
    include("networks/flux.jl")
    using .FluxNets
  end
end

Is it possible that such code would not be well supported? More generally, I would like to have a more precise idea on what the limitations of the linter are so I can use it effectively.

Edit: You can easily try this yourself by cloning my repo:

git clone --branch v0.3.0 https://github.com/jonathan-laurent/AlphaZero.jl.git
cd AlphaZero.jl
1 Like