-
Notifications
You must be signed in to change notification settings - Fork 152
Description
As we approach the Realm split, Legion will need to download and build specific Realm versions. The question here is how to do that pinning.
Below I outline four approaches I'm aware of, but this is not an endorsement of any specific approach.
-
CPM (CMake Package Manager)
We already use CPM to build Realm inside the Legion CMake build, and CPM supports the ability to pin a specific commit ID. However this would not address the Makefile, so we'd need a separate solution there.
CPM can (probably?) work with caching so this approach is CI-friendly.
One disadvantage of this (and all build-side tooling) is that users can't download the Realm code without actually running the build tool. One has to run CMake to get CPM to download the Realm source, and if we build something similar for the Makefile it would be the same thing.
-
Git submodules
We could make Realm a Git submodule. This would mean that users would have to start cloning Legion with
git clone --recursive
(or then subsequently rungit submodule update --init
).One advantage of submodules is that users can obtain the corresponding Realm source without running CMake or any other build tool.
With submodules there is also the question of where the submodule lives. You can use an absolute (
https://github.com/StanfordLegion/realm.git
) or relative (../realm.git
) link.I don't see how you'd cache a submodule, so we might hit GitHub rate limits, unless we use a relative link and mirror Realm into Gitlab (but that adds complexity).
-
Git subtress
git subtree
is a contrib module included in Git for many years now. It's basically likegit submodule
except you literally copy the code into the target repository. There are a variety of modes and flags you can use; maintaining history is optional.Subtrees mainly benefit users by removing the second step to download code. It's just there, directly in the repo. On the other hand it takes some discipline to use it correctly (e.g., one would want to treat the
realm/
subdirectory as read-only from inside the Legion repository). -
Custom tooling
This could be practically anything, but one possibility would be to store a file named
REALM_VERSION
(name subject to change) that contains the commit ID of a specific Realm version. Then various tools (CPM/Makefile/etc.) can refer to that file to download the corresponding Realm version.I'm sure that CPM can be made to download a commit ID from a file (CMake can read files), I'm not sure what we'd do in the Makefile.
If we wanted to enable users to download the Realm code without running one of the build tools (CMake/Make) then we'd need a custom script for it.
There may be other dimensions or options I haven't thought of. Please respond with any suggestions/questions/concerns below.