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

**URL:** <https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190>\
**Category:** General Usage\
**Created:** [February 20, 2018, 12:49am UTC](https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190 "2018-02-20T00:49:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Vavasis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephen_vavasis/32/3389_2.png) [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Post date:** [February 20, 2018, 12:49am UTC](https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190/1 "2018-02-20T00:49:41Z")

</div>

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:

```julia
import A.myfunction1
import B.myfunction2

```

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

```julia
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`:

```julia
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.

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [February 20, 2018, 5:24am UTC](https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190/2 "2018-02-20T05:24:13Z")

</div>

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

```julia
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).

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 20, 2018, 7:31am UTC](https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190/3 "2018-02-20T07:31:55Z")

</div>

[https://github.com/JuliaLang/julia/pull/23579](https://github.com/JuliaLang/julia/pull/23579)

---

<div class="post-metadata">

**Author:** ![BioTurboNick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bioturbonick/32/6380_2.png) [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Post date:** [November 15, 2018, 3:22pm UTC](https://discourse.julialang.org/t/loading-modules-at-the-repl-in-0-7-is-it-different/9190/4 "2018-11-15T15:22:40Z")

</div>

Was this actually solved? When I try to load modules that are written to depend on one another e.g.

A.jl  
B.jl has `using A` in it

When I try to include A and then B at the REPL, A is loaded as “Main.A” and B is unable to find A.

How should I be writing modules so that they can work independently of whether they are in the REPL or loaded via Pkg? Or should Julia be able to do this already?
