# Create and use local module

**URL:** <https://discourse.julialang.org/t/create-and-use-local-module/46989>\
**Category:** New to Julia\
**Created:** [September 21, 2020, 9:16am UTC](https://discourse.julialang.org/t/create-and-use-local-module/46989 "2020-09-21T09:16:35Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [September 22, 2020, 2:54pm UTC](https://discourse.julialang.org/t/create-and-use-local-module/46989/12 "2020-09-22T14:54:35Z")

</div>

> [@lmiq](#):
>
> Finally, I do agree that there is a problem in that Revise does not track the modifications of a `include()` d file within a a file which was itself included with `includet` .

Explaining myself:

`MyModule.jl`:

```julia
module MyModule
  include("./mycode.jl")
end

```

`mycode.jl`:

```julia
f(x) = x + 1

```

Testing:

```julia
julia> using Revise

julia> includet("./MyModule.jl")

julia> MyModule.f(1)
2

shell> vim mycode.jl # changed the behaviour of f(x) inside mycode.jl

julia> MyModule.f(1) # the change in f was not tracked
2

julia> 

```

I think this is an issue. Perhaps someone can explain if there is a reason for the file not being tracked, or if we should file an issue.

**EDIT: According to this post:**

> [@\`Revise.jl\` dosn't work on \`include\`ed files](https://discourse.julialang.org/t/revise-jl-dosnt-work-on-include-ed-files/26872/4):
>
> You should think of using and import as the “real” ways to track code. includet is deliberately intended to be “track just this file”—it’s designed as the manual alternative to the automated smarts of using and import. You can turn Tvaccine into a package in seconds ([GitHub - invenia/PkgTemplates.jl: Create new Julia packages, the easy way](https://github.com/invenia/PkgTemplates.jl)) or use push!(LOAD\_PATH, dir-of-Tvaccine.jl). Then using Tvaccine should do what you want. The second issue is a [known bug](https://github.com/timholy/Revise.jl/issues/107). Since that state of affairs is ra…

`includet` is thought to track only the file itself. The workflow that is recommended is that of @ctkelley, meaning, if the module is in the current directory:

```julia
using Revise
push!(LOAD_PATH,"./")
using MyModule

```

Not bad. One can add this `push!(LOAD_PATH,"./")` to the `startup.jl` file and then just use the modules in the current working directory directly.

---

_[View the full topic](https://discourse.julialang.org/t/create-and-use-local-module/46989)._
