Package directories query

When you do add ../PackageA you get an entry like this in your Manifest file:

[[deps.PackageA]]
git-tree-sha1 = "31604fd54e5a488ba22fcca12602405740a2ae59"
repo-rev = "main"
repo-url = "../PackageA"
uuid = "c5788b5b-9078-464d-8306-3cfa814b54ce"
version = "0.1.0"

There’s a repo-url entry with ../PackageA as its value, indicating that’s where the package “upstream repo” can be found. There’s also a uuid indicating the identity of the package and a git-tree-sha1 giving the tree hash of the code to use. The actual code is found by looking in ~/.julia/packages/PackageA/Wd1MK (the last part is computed as a function of uuid and git-tree-sha1) which is where the code is installed after cloning a copy of the repo found at ../PackageA.

When you do dev ../PackageA you instead get an entry like this:

[[deps.PackageA]]
path = "../PackageA"
uuid = "c5788b5b-9078-464d-8306-3cfa814b54ce"
version = "0.1.0"

Instead of a repo-url entry, there’s a path entry indicating that the actual source of the package can be found at ../PackageA. There is no git-tree-sha1 entry since the content at the path location is expected to change, so any tree hash would become outdated. This is what a dev entry generally looks like.

What you probably want to do is have a root project file for your application and dev all of your internal package dependencies like this and check that into the repo. If you insist on using a package directory instead, there’s no need to push all the dependency directories into the LOAD_PATH—in fact, that won’t work—you only need to push the one directory that contains all the packages into the LOAD_PATH. But again, that’s not recommended—it’s better to use the dev mechanism. There’s nothing wrong with modifying your load path or depot path, that’s why the variables exist. It’s just not necessary for what you’re trying to do.

2 Likes