I think this lib
directory is more convention than anything else. HDF5.jl has a filters
directory containing filter sub-packages.
Perhaps the larger explanation that you are looking for is regarding subdirectory packages.
Unlike modules in the src
directory, these other folders are packages in their own right. They have their own Project.toml with an UUID. They just happen to be housed within the same git repository as the parent package.
Pkg
does not have an automatic way of looking into a lib
directory. One could add the lib directory as a place to load packages from via the environment variable JULIA_LOAD_PATH
or the Julia variable Base.LOAD_PATH
.
The way HDF5.jl loads up the subpackages is via Pkg.develop
or ]dev
which allows you specify a local file system path to a package.
ArrayInterface.jl seems to do something similar:
Pkg.develop
will add these packages to the project’s Manifest.toml which will remember the relative paths. However, the Manifest.toml is not usually tracked by git for a library package like those you mentioned.