Package dependencies

Currently trying to understand packages and dependencies. I’ve created a package that just holds type definitions, made the git repo and done all of the setup. Now I’m creating a second package that will need access to the types package. How do I add the types package as a dependency to the second package. Like this?

pkg> activate myPackage
pkg> add local/path/to/types/package

or do I need to specify the address to the git repo?


You can do that, though then you’re going to be bound to the current version of the first package. If you’re actively developing both together, you probably want ] dev path/to/OtherPackage.

Pkg.add would require the local package to be in a git repository to work. local/pathpkgdocs.julialang should have a .git subdirectory that is initialized.

As Kevin mentioned, you almost certainly want to Pkg.develop a local package.