# Local package development methodology discussion

**URL:** <https://discourse.julialang.org/t/local-package-development-methodology-discussion/31515>\
**Category:** General Usage\
**Tags:** package\
**Created:** [November 26, 2019, 4:01am UTC](https://discourse.julialang.org/t/local-package-development-methodology-discussion/31515 "2019-11-26T04:01:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/glen/32/3583_2.png) [@Glen](https://discourse.julialang.org/u/Glen)\
**Post date:** [November 26, 2019, 4:01am UTC](https://discourse.julialang.org/t/local-package-development-methodology-discussion/31515/1 "2019-11-26T04:01:27Z")

</div>

Hi,

I’ve been using Julia for a while and developed the habit of setting `LOAD_PATH` in the Julia start-up file so that I have a directory structure like:

```julia
~/julia/dev-0.4/*packages*
~/julia/dev-0.5/*packages*
~/julia/dev-0.6/*packages*
~/julia/dev-0.7/*packages*
...
~/julia/dev-1.2/*packages*

```

As Julia 1.0 was released and then Pkg was introduced I’m starting to realise this is sub-optimal. I’ve looked at using Pkg to help organise my packages with using semver and compat but I’m not sure how to organise my packages. For example, if I didn’t use `LOAD_PATH` but used environments for each package with exporting `JULIA_PROJECT=@.` and then simply did `] add /path/to/dependency` or `dev --local` it, then:

1. Could I have my packages in random locations, spread through the directory structure and just reference them with an absolute file path to `dev` or `add`? That would be helpful as often packages are a script or two for some other project and I don’t want to put all my Julia packages in a single dir.
2. Or should I do all my development in `~/.julia/dev` (`JULIA_PKG_DEVDIR`)
3. If I `dev` a dependent package in order to make changes in the dependent package while I’m also making changes to the current package then will packages that depend on the current package break (eg. not use the stable “released” versions)?
4. Perhaps I need to publish my changes to a local Julia registry but that seems to be overkill for one local user. Or maybe people use a “production” and “development” environment instead of one environment per package.
5. I often use `Revise` in the REPL but then I must add it as a dependency to the environment `add Revise` but I don’t want `Revise` being an actual dependency. How should “development only” dependencies be handled?

Basically I want to have a methodology that will not break existing packages that depend on the one I’m modifying and use the powerful version resolver to figure out what packages to use.

Thanks for the tips!

Glen

---

<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:** [November 26, 2019, 7:05am UTC](https://discourse.julialang.org/t/local-package-development-methodology-discussion/31515/2 "2019-11-26T07:05:57Z")

</div>

> [@Glen](#):
>
> Could I have my packages in random locations, spread through the directory structure and just reference them with an absolute file path to `dev` or `add` ?

I think this is fine. I keep packages where I am an author/contributor in `~/code/julia/`, and for the occasional PR to other packages I just `pkg> dev` and work on the code in `~/.julia/dev`.
