6 Package assimialtion using submodules
There is a option to treat any package that can be installed from a directory as a local package - because of this there is a possibility of using git submodules as local packages.
This means that Req does not have to record the git commit hashes of the packages, like for example Pipenv or Julia package managers would do, but git will keep that information instead.
6.1 Examples
6.1.1 asd
If a package "asd" comes from repository "https://gitlab.co/asd/asd/", has package path in "src/asd-lib", and is registered in local repository on path "src/asd", then the inclusion in project "qwe" would be similar to the following:
{
"local": [
["src/qwe", "qwe"],
["src/asd/src/asd-lib", "asd-lib"]
]
}
6.1.2 req
If Req assimilated the package ziptie-monorepo (into the path "src/racket-ziptie"), then Req’s configuration would look like the following:
{
"root": "src",
"local": [
"req*",
["racket-ziptie/src/ziptie-monorepo", "ziptie-monorepo"]
]
}
And the output of calling raco req -s would be:
catalogs:
- https://pkgs.racket-lang.org/
local:
- ziptie-monorepo ✓
/home/user/source/public/gitlab.com/xgqt/racket-req/src/racket-ziptie/src/ziptie-monorepo
- req-test ✓
/home/user/source/public/gitlab.com/xgqt/racket-req/src/req-test
- req-lib ✓
/home/user/source/public/gitlab.com/xgqt/racket-req/src/req-lib
- req ✓
/home/user/source/public/gitlab.com/xgqt/racket-req/src/req
- req-doc ✓
/home/user/source/public/gitlab.com/xgqt/racket-req/src/req-doc
dependencies:
- base ✓
- racket-doc ✓
- rackunit-lib ✓
- scribble-lib ✓
- threading-lib ✓
- upi-lib ✓
- ziptie-git ✓
extras: