# Pkg3 project workflow questions

**URL:** <https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [July 19, 2018, 1:04pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490 "2018-07-19T13:04:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 19, 2018, 1:04pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490/1 "2018-07-19T13:04:08Z")

</div>

I am using the new `Pkg` setup for _projects_, ie bundles of code which are not necessarily packaged, but serve the a specific purpose (eg accompany a paper). I have some clarifying questions about the workflow.

I set up the directory structure like

```julia-auto
ThisProject/
   Project.toml
   Manifest.toml
   src/
       ThisProject.jl # which has "module ThisProject ... end"

```

### Questions:

1. Is it OK if I don’t `dev` this project in the global environment, just use

2. Having things in a module is convenient because of `Revise.jl`. Can I have multiple modules though, or do they have to be submodules of the same module? How should I set up the files?

3. Unless I

---

<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:** [July 19, 2018, 1:15pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490/2 "2018-07-19T13:15:36Z")

</div>

1. 

Yes, that is the intended workflow.

1. 

You can have subpackages inside the project that you dev, but Revise can also track files that are just `included` with `Revise.track`.

1. 

Dependencies of dependencies could update on `add` unless you pin them (due to [https://github.com/JuliaLang/Pkg.jl/issues/211](https://github.com/JuliaLang/Pkg.jl/issues/211)). But with the Manifest you can recreate the exact versions, yes.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 19, 2018, 1:24pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490/3 "2018-07-19T13:24:42Z")

</div>

Just to clarify the subpackages,

1. is there a 1-to-1 correspondence between modules and packages as far as loading is concerned? Eg I cannot have

```nohighlight
src/
    SomeModule.jl
    SomeOtherModule.jl

```

and then

```julia
using SomeModule
using SomeOtherModule

```

?
2. for the `dev`, I would need to set up a hierachy like

```nohighlight
src/
    MainProjectModule.jl
misc/
    OtherModule/
        src/
            OtherModule.jl

```

and then `dev ./misc/OtherModule`, or is it simpler than this?

---

<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:** [July 19, 2018, 2:14pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490/4 "2018-07-19T14:14:31Z")

</div>

You would have to do as 2 if you want them to be separate packages and be individually loadable.

---

<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:** [July 19, 2018, 5:24pm UTC](https://discourse.julialang.org/t/pkg3-project-workflow-questions/12490/5 "2018-07-19T17:24:11Z")

</div>

If you want to provide two modules from the same package, you can make them both submodules of the main package module.
