Experimental repo that automatically builds the host application and plugins together. This should be useful for testing the core GUI and external plugins in one place.
Thanks to @admunkucsd for the inspiration and instructions!
-
Clone this repository locally.
-
Launch Visual Studio Code with the following extensions installed:
- C/C++
- CMake Tools
- C++ TestMate
-
Open the
gui-monorepo
directory -
Select the "All Open Ephys Components" configuration preset for your platform.
-
Select "install" as the default build target.
-
Run "Build"
Now, you should be able to run and debug the GUI, and run and debug all tests from within Visual Studio Code.
To add an additional plugin as a submodule, navigate to the top-level directory (gui-monorepo
) and run:
git submodule add <repository_URL>
Running git status
after adding the submodule will show that the module is stored as a commit hash. This will influence all interactions with this submodule through the perspective of the monorepo: you are not interacting with the submodule repo directly, but rather the submodule in a discrete state, i.e. at a particular commit in a detached HEAD state.
Running git pull
will update the submodule hashes the monorepo should use, but will not actually update the submodules directory. After running git pull
to update the base repo, run the following to update the submodules:
(for the first time): git submodule update --init --recursive
(subsequent pulls): git submodule update --recursive
IMPORTANT: Git does not automatically push submodule changes when pushing from the top-level repo. As such, other users that pull this remote branch may not be able to pull the correct submodule hashes from their respective remotes. To fix this, add the following git config flag:
git config push.recurseSubmodules on-demand
This will change git push
to recursively push all submodules to remote.
Submodules leave git artifacts beyond the reference hash. To fully remove a submodule, follow these instructions:
- Delete the relevant section from the .gitmodules file
- Stage the .gitmodules changes:
git add .gitmodules
- Delete the relevant section from
.git/config
- Run
git rm --cached path_to_submodule
(no trailing slash) - Run
rm -rf .git/modules/path_to_submodule
(no trailing slash) - Commit using
git commit -m "Removed submodule"
- Delete the now-untracked submodule files:
rm -rf <path_to_submodule>