Workflow for local packages with local dependencies

(I’m assuming you need to commit the Manifest file because your packages are not registered. Is that correct?)

I think the situation is a bit tricky here, because as soon as you want to publicly release both packages, you’ll have to ensure that the publicly available versions are compatible. In other words, you’ll have to avoid situations where the released version of A depends on a not-yet-released (but available on your machine) version of B.

One thing you could do is (let me rename A and B to App and Lib respectively):

  1. commit a clean version of Lib and release it on http://git.server/Lib.jl.git (possibly in a dev branch if you don’t want to advertize it as the new master version)
  2. make App depend on the public release of Lib:
    ] add http://git.server/Lib.jl.git#dev
    
  3. commit a clean version of App and publicly release it (again, possibly in a specific branch). While doing so, make sure its Manifest file does not contain any local reference to Lib. This way, anybody cloning or adding App from its public git repository will get a clean dependency on the publicly available version of Lib.
  4. In order to easily develop App, temporarily switch to developing Lib again:
    ] dev /local/path/to/Lib.jl
    
  5. do as many local changes as you want in App and Lib, but don’t commit anything at this stage. (otherwise you’d risk having inconsistent commits in your repos)
  6. whenever you get to a working version of both packages and want to commit, go back to step 1.
12 Likes