# Julia 0.7/1.0: How to test dev packages 

**URL:** <https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516>\
**Category:** General Usage\
**Created:** [September 26, 2018, 1:36pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516 "2018-09-26T13:36:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![silviacaprioli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/silviacaprioli/32/5507_2.png) [@silviacaprioli](https://discourse.julialang.org/u/silviacaprioli)\
**Post date:** [September 26, 2018, 1:36pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/1 "2018-09-26T13:36:39Z")

</div>

Hello,

I’m having some troubles in testing a package I’m developing.

I have the current official version of the package taken from git repository (using “add” command), stored in `.julia/packages/MyPackage.

I also downloaded MyPackage for development (using “dev” command), which is stored locally in .julia/dev/MyPackage, and I modified it.  
I want to test the modified package.

The point is that the line

```julia
using Mymodule 

```

in test/runtests.jl is calling the older version of the package stored in .julia/packages, and not the one in the working directory.  
Probably I don’t fully understand the new package manager.

Thanks in advance,

Silvia

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [September 26, 2018, 1:43pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/2 "2018-09-26T13:43:09Z")

</div>

I think you may have `free`ed the package again, it then uses the `.julia/packages/MyPackage`. What happens if you first `dev MyPackage` and then `test MyPackage`?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [September 26, 2018, 4:42pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/3 "2018-09-26T16:42:14Z")

</div>

@mauro3’s suggestion is the right way to fix the problem. For diagnosing this kind of problem, it may be handy to pointing out the existence of `pathof`:

```julia
help?> pathof
search: pathof

  pathof(m::Module)

  Return the path of m.jl file that was used to import module m, or nothing if m was not imported from a package.

  Use dirname to get the directory part and basename to get the file name part of the path.

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 26, 2018, 4:43pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/4 "2018-09-26T16:43:23Z")

</div>

`pkg> status` should also show you a path to where it is loaded from if it is devved.

---

<div class="post-metadata">

**Author:** ![silviacaprioli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/silviacaprioli/32/5507_2.png) [@silviacaprioli](https://discourse.julialang.org/u/silviacaprioli)\
**Post date:** [September 27, 2018, 3:30pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/5 "2018-09-27T15:30:41Z")

</div>

following @mauro3 suggestion, I tried to do `dev MyPackage`, with the following error:

```julia
ERROR: expected a 'name' entry in project file at .julia/dev/MyPackage/Project.toml

```

and then I realized that the lines:

```julia
name = "MyPackage"
uuid = "....."

```

were missing in Project.toml file!  
That’s because I didn’t create a new package using “generate MyPackage”, but I downloaded an already existing package to modify it. And this package was created with a previous version of Julia (0.6) and originally had not the Project.toml file.  
That’s what apparently caused the problem!

Thank you all for your help and suggestions!

cheers,

Silvia

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 27, 2018, 3:33pm UTC](https://discourse.julialang.org/t/julia-0-7-1-0-how-to-test-dev-packages/15516/6 "2018-09-27T15:33:27Z")

</div>

Glad you worked it out!
