Loading modules at the REPL in 0.7 - is it different?


#1

My code is divided into several files, say A.jl, B.jl, C.jl, each of which defines a single module, say A, B, C. Inside C.jl there are declarations like this:

import A.myfunction1
import B.myfunction2

In 0.6.2, I was able in the REPL to issue instructions in this order:

include("A.jl")
include("B.jl")
include("C.jl")

and then my code would run. In 0.7-DEV, module C can’t find b.myfunction2. it appears that C.jl now must qualify the import statements with Main:

import Main.A.myfunction1
import Main.B.myfunction2

in order to support this workflow. Is this correct? Why the change? I would rather not explicitly refer to Main in the source files since I might reorganize my code later to look for the modules elsewhere, e.g., using the Package mechanism.


#2

While we’re waiting for enlightenment, I’ll suggest changing to

import ..A:myfunction1
import ..B:myfunction2

This way things continue to work if you wrap up the include statements in another module. (Also seems to work on v0.6).


#3