# How to add a Directory Package to an existing Project?

**URL:** <https://discourse.julialang.org/t/how-to-add-a-directory-package-to-an-existing-project/59997>\
**Category:** New to Julia\
**Tags:** package\
**Created:** [April 25, 2021, 6:18pm UTC](https://discourse.julialang.org/t/how-to-add-a-directory-package-to-an-existing-project/59997 "2021-04-25T18:18:54Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![aschweig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aschweig/32/23893_2.png) [@aschweig](https://discourse.julialang.org/u/aschweig)\
**Post date:** [April 26, 2021, 2:59pm UTC](https://discourse.julialang.org/t/how-to-add-a-directory-package-to-an-existing-project/59997/5 "2021-04-26T14:59:56Z")

</div>

Thanks ffevotte,

> I’m not sure I understand why you don’t want the `MyApp` code and the `MyLib` code to live in the same project/package?

What I have done so far is to use `include("...")` to spread my code among many files. Perhaps because of my experience with C++ templates, I trend to view large include graphs as something to be wary of, particularly as the application grows larger. There seems to have been some lively discussion about [using relative imports](https://github.com/JuliaLang/julia/issues/4600) – but some proposals amount to something like `include` + `using` – which feels like it makes pre-compilation an impossibility. Is there a way to use submodules without using `include` or guarantee pre-compilation?

My understanding is that [pre-compilation occurs at the package level](https://discourse.julialang.org/t/organisation-into-submodules-and-multiple-dispatch/40641), hence the desire to factor out stable code into packages (using `using Lib` not `include`) keeping all within the same git repo for MyApp.

From what I have read, one package per project per repo is a valid way to factorize development of larger applications. But I haven’t warmed to this as it seems like overkill and increases coordination cost between components; for packages used in one code base, git branches suffice for my needs. There may be a way forward by manipulating `LOAD_PATH` outside of the Pkg REPL; if so I would like to hear if/how others do it in v1.6+.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-a-directory-package-to-an-existing-project/59997)._
