# Using different versions of the same module

**URL:** https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448
**Category:** New to Julia
**Created:** [October 15, 2017, 2:38pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448 "2017-10-15T14:38:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![turtle](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@turtle](https://discourse.julialang.org/u/turtle)
#### Post date: [October 15, 2017, 2:38pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/1 "2017-10-15T14:38:23Z")

</div>

I have a module named `KIT` in a single file named `KIT.jl`.  
`using KIT` is all what I need for using it.

Question:  
If I have different versions of the file in the same directory  
(e.g. KIT\_2017-09-30.jl, KIT\_2017-10-15.jl)  
how can I use them without first renaming to `KIT.jl` ?

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [October 15, 2017, 2:48pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/2 "2017-10-15T14:48:20Z")

</div>

The automatic loading in `using` designed/should not be used for that. Just include the file. You’ll obviously get name conflict if you’ve already imported one version and if you really want to have multiple versions loaded as the same time and confident that your own module can actually handle this you can wrap the include in another module that has a different name, i.e. `module V1 include("v1.jl") end; module V2 include("v2.jl") end`

---

<div class="post-metadata">

### Author: ![turtle](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@turtle](https://discourse.julialang.org/u/turtle)
#### Post date: [October 15, 2017, 3:26pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/3 "2017-10-15T15:26:34Z")

</div>

Thank you for the explanation.  
So it seems I have to keep renaming backup files.

As the first line of each backup file is already `module KIT`,  
and I prefer not touching the backup files,  
this seems to be the only option now.

(Even after calling `workspace()` which I forgot to mention.)

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [October 15, 2017, 3:46pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/4 "2017-10-15T15:46:01Z")

</div>

Also note that using a version control system, e.g. git, is usually a much better option…

---

<div class="post-metadata">

### Author: ![turtle](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@turtle](https://discourse.julialang.org/u/turtle)
#### Post date: [October 15, 2017, 3:52pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/5 "2017-10-15T15:52:08Z")

</div>

True.

Still many potential users work with a local workflow,  
so I think the original question was relevant.

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [October 15, 2017, 4:32pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/6 "2017-10-15T16:32:04Z")

</div>

> [@turtle](#):
>
> so I think the original question was relevant.

Sure, but

> [@turtle](#):
>
> Still many potential users work with a local workflow,

is irrelevant. Version control, especially distributed version control systems like git, is a local workflow.

---

<div class="post-metadata">

### Author: ![Balinus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/balinus/32/243_2.png) [@Balinus](https://discourse.julialang.org/u/Balinus)
#### Post date: [October 16, 2017, 7:02pm UTC](https://discourse.julialang.org/t/using-different-versions-of-the-same-module/6448/7 "2017-10-16T19:02:50Z")

</div>

Indeed, you can use git locally. Works really well.

I don’t know of your current workflow, but to work package development, I find [Revise.jl](https://github.com/timholy/Revise.jl) to be really useful.
