My goal: For a project, be able to include local files (part of the same project, same exact directory), trivially, possibly circularly.
In Julia, say I have the files:
FILE1.jl
module A
include("FILE2.jl")
using B
# Type annotations that need types from B
end
FILE2.jl
module B
include("FILE1.jl")
using A
# Type annotations that need types from A
end
In Julia (>v1), this results in an infinite loop. I have tried adding files to my loadpath so that I may directly use using or import, but it still can't find them.
What is the "Julian" way to include files within the same directory assuming circular dependencies, and are part of the same project? I see many posts saying something like, "if this is the case, your code is probably wrong", and I think that's just a silly claim to make.