Yeah, you definitely don’t want to do that–you are creating two completely unrelated modules called M1
by calling include()
twice. If you’re familiar with C++, this would be like including the same header outside of and inside of a namespace.
You don’t need to use projects for this (although projects are incredibly useful). Just add the current directory (“.”) to your LOAD_PATH
and get rid of all your include()
calls:
julia> push!(LOAD_PATH, ".")
4-element Array{String,1}:
"@"
"@v#.#"
"@stdlib"
"."
julia> using M1
[ Info: Precompiling M1 [top-level]