# 0.7 "projects" and "applications" -- how to use?

**URL:** <https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443>\
**Category:** General Usage\
**Created:** [June 5, 2018, 1:03pm UTC](https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443 "2018-06-05T13:03:01Z")\
**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:** [June 5, 2018, 1:03pm UTC](https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443/1 "2018-06-05T13:03:02Z")

</div>

The new 0.7.0-alpha manual section on the package manager introduces the concepts of “project” and “application”-- I presume that these are meant for ordinary users trying to develop their own code? In this case, I have a few questions about how these are supposed to work.

1. If I use the “]” operation in the REPL and then ask the package manager to `generate` a project, it creates the folder hierarchy in the current directory. However, by default, the current directory is not searched by the `import` operation. What is the recommended workflow-- append “.” to the `LOAD_PATH`? To the DEPOT path? Or somehow instruct the `generate` command to use a different folder?

2. If there is a file called `runtests.jl` that lives in PROJ/test/ of a package, then this file is executed by the `Pkg.test("PROJ")` command. But what about “projects” and “applications” that aren’t packages-- what is the standard way to reach this `runtests.jl` file? So far I have reached it by `import Test.@test`, `import Test.@testset`, etc., and finally `include("PROJ/test/runtests.jl")`. UPDATE (a few minutes later): I just discovered that the `pkg` command prompt supports a `test` command. However, I couldn’t figure out how to use it. f I execute it in the current working directory, it doesn’t know which package to test, and if I execute it in the top-level directory of the project, it tells me that the name of the project is undefined (`UndefVarError`).

3. If I change one of the .jl files in the `src` directory of a project, how do I tell the package manager to reload the source, i.e., what is the typical development workflow? I tried the `update` command from inside the package manager, but it did not have the desired effect. So far, the only means I know to load changes in the source files of the project is to exit and restart the REPL.

---

<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:** [June 5, 2018, 8:32pm UTC](https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443/2 "2018-06-05T20:32:04Z")

</div>

> [@Stephen\_Vavasis](#):
>
> owever, by default, the current directory is not searched by the `import` operation.

You can `cd` into the project that was created. Then you can import it.

> [@Stephen\_Vavasis](#):
>
> If there is a file called `runtests.jl`

To test a dependency in a project you should be able to do `Pkg.test("Dependency")` or using the REPL `pkg> test Dependency`. To test the project itself use `Pkg.test()` or `pkg> test`.

> [@Stephen\_Vavasis](#):
>
> So far, the only means I know to load changes in the source files of the project is to exit and restart the REPL.

I don’t see how this is related to the new package manager. To hot-load code use something like Revise. Maybe I am missunderstanding.

---

<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:** [June 5, 2018, 10:10pm UTC](https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443/3 "2018-06-05T22:10:15Z")

</div>

Thanks for the suggestions! The `test` operation was failing because of a bug in my runtests.jl file, not because a problem with the system, but the error message confused me. After I fixed the bug, it works fine.

With regard to my other question, I had not previously used `Revise.jl`. My previous workflow was to put my code in modules inside .jl files and then `include` them after each revision. However, `Revise.jl` in tandem with the new “project” system appears to be a much better solution.

---

<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:** [June 6, 2018, 3:25am UTC](https://discourse.julialang.org/t/0-7-projects-and-applications-how-to-use/11443/4 "2018-06-06T03:25:29Z")

</div>

Obstinate fans of the old-fashioned (`Revise`-free) workflow may find this useful:

```julia
"""
    minclude(path::String)

load a module-defining file at toplevel.
This makes the associated module available for other modules to use or import,
allowing for hot-reloading (by repeated invocation of `minclude`).
"""
minclude(path) = Base.include_relative(Base. __toplevel__ ,path)

```
