I am writing some code in VSCode, and I am not sure how what it the best way to split the code in multiple files. As indicated in the Julia documentation, a typical way is to have a single file that includes in the correct order a list of source files:
module X
include("a.jl")
include("b.jl")
include("c.jl")
end
My problem is that many definitions present in a.jl
are actually used in b.jl
and c.jl
: as a result, the linter in VSCode shows a lot of “Missing reference” errors which really annoy me and which make almost useless the linter itself (in the sense that a typo creating a genuine “missing reference” error is easily missed).
What is the way of solving this issue? Including a.jl
in b.jl
and in c.jl
would be a workaround but this would also force Julia to load the file multiple times, which clearly is not a good thing…