The formatter treats all relative imports as modules which is not always the case. See MWE below:
Input
test.jl
module Foo
const bar = 1.0
module Baz
import ..bar
end
end
Output
julia -e 'using JuliaFormatter; format("test.jl", BlueStyle())'
module Foo
const bar = 1.0
module Baz
# 😱
using ..bar: bar
end
end
Workaround
Change input to
module Foo
const bar = 1.0
module Baz
using ..Foo: bar
end
end
The formatter treats all relative imports as modules which is not always the case. See MWE below:
Input
test.jlOutput
julia -e 'using JuliaFormatter; format("test.jl", BlueStyle())'Workaround
Change input to