Combining two co-dependent modules into a single program

Just to say that I don’t think this is quite right-- Julia really does have a concept of “packages”, and they don’t need to be tied to separate GitHub repositories (or even on GitHub or on the internet at all!). Julia has a package manager (the standard library Pkg) which has a concept of a “package registry” which is essentially a directory of “packages”. Packages are pieces of code in a single module (which can have submodules if you wish) that can have dependencies on other packages and declare compatability with them. These relationships are stored both in the packages’ Project.toml file and in the registry itself. The package manager’s job is to “resolve” a set of versions of packages that are all mutually compatible and retrieve them.

None of this requires GitHub or the internet, but the most common use of this is the General registry which comes preinstalled with the package manager, and has additional requirements about its packages (e.g. that they are accessible at a hosted git repository on the internet, although not necessarily on GitHub). However, LocalRegistry.jl makes it easy to make and use registries locally.

Registries and packages are a very useful way to organize large codebases in a flexible way that allows upgrading one part of the codebase while allowing other parts to rely on older versions of some of the code until they can be upgraded. This modularization is essential for large decentralized projects like the open source community, but also is a great way to manage large codebases even within a single organization.

2 Likes