Local package development methodology discussion

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/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

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.