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.toml
s, 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 develop
ed (-local
ly) 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 develop
ed (-local
ly) 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 develop
ed (-local
ly) 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
- 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.
- I noticed that although
mypkgA.jl
’s manifest points to the GitHub repository ofmypkgB.jl
, when I make changes to code insidedev\mypkgB
those changes are recognized bymypkgA
and available in thedevelopment.jl
even without pushing those changes tomypkgB.jl
’s repository. It is a very nice behavior, but how is that? Isn’tmypkgA.jl
supposed to use the versions of its dependencies as specified in its manifest?
Thanks in advance.