Source overlays allow you to use a cloned source repository instead of the downloaded archive of a package within a program.
These overlays are defined in a sources.json
file as follows:
{
"packages": {
"<ID>": {
"source": {
"location": "<absolutePath>"
}
}
}
}
Where:
<ID>
is theUID
(minus protocol) of a package or the key used for thepackages
property inprogram.json
<absolutePath>
is the absolute path to the cloned source repository of the package on your local system
The loader automatically looks for source overlay files in various places or you can specify your own as an argument on the command line. The following lookup order for source overlay files applies and the first match for a package ID is used.
--sources ABSOLUTE_PATH
command line argumentdirname("/.../program.json") + "/sources.local.json"
(local overlays not committed with program)$HOME/.pinf/config/sources.json
(user-specific overlays that apply to all programs)dirname("/.../program.json") + "/sources.json"
(overlays managed with program)