Collaborative development workflow for multiple packages simultaneously on multiple machines

Hello,

I’m simultaneously developing two packages, say mypkgA.jl and mypkgB.jl, where mypkgA.jl depends on mypkgB.jl. They’re both currently unregistered, and I have to work on two different machines depending on the day of the week.

I’d like to ask you what is the best way to setup the various Project.tomls, Manifest.toml i.e. what to do when comes to developing workflow in such scenario.

My current setup is the following.

The manifest of mypkgA.jl is:

(mypkgA) pkg>st
     Project mypkgA v0.1.0
      Status `D:\MyDrive\...\mypkgA\development\dev\mypkgA\Project.toml`
	[mypkgB_uuid] mypkgB v0.1.0 `https://github.com/username/mypkgB.jl#main`
	# Registered dependencies...
	

As you see, mypkgA.jl is developed (-locally) inside a Google Drive folder, so that I can sync the code between my two machines without cluttering the GitHub commit history. mypkgB.jl is also developed (-locally) inside D:\MyDrive\...\mypkgA\development\dev.

To develop mypkgA.jl, I have activated a Julia project inside D:\MyDrive\...\mypkgA\development, which has the following manifest:

(development) pkg> st
      Status `D:\MyDrive\...\mypkgA\development\Project.toml`
	[mypkgB_uuid] mypkgB v0.1.0 `dev\mypkgB`
	[mypkgA_uuid] mypkgA v0.1.0 `dev\mypkgA`
	[295af30f] Revise v3.3.3
	# Other registered dependencies...

Notice that I developed (-locally) mypkgB.jl before mypkgA.jl. Then inside D:\MyDrive\...\mypkgA\development I have a script development.jl:

# development.jl
using Pkg;
Pkg.activate(".") 

using Revise
using mypkgA

That I use to actively develop the two packages.

Questions

  1. Is there a better or more idiomatic way to do it? The package implements complex behaviors that make it difficult to proceed with test-driven development.
  2. I noticed that although mypkgA.jl’s manifest points to the GitHub repository of mypkgB.jl, when I make changes to code inside dev\mypkgB those changes are recognized by mypkgA and available in the development.jl even without pushing those changes to mypkgB.jl’s repository. It is a very nice behavior, but how is that? Isn’t mypkgA.jl supposed to use the versions of its dependencies as specified in its manifest?

Thanks in advance.

1 Like

I have a similar setup for developing personal/unregistered packages across multiple computers. I use Dropbox to sync my ~.julia/dev/ folder by adding a symbolic link from ~.julia/dev/ to a dev folder within my Dropbox.

This way I can ] dev PkgA PkgB from the default environment of each computer, and any local package dependencies (e.g. PkA depending on PkgB) are resolved appropriately and Revise is able to track everything properly. (And any in progress changes are synced between computers depending on whether I’m in the office or WFH)

2 Likes