Dev Set-Up¶
GitHub Codespaces¶
We highly recommend you use our ready-made “1 click” Web/Cloud IDE set-up.
Development Environment in a Docker Container¶
Because it can be a PITA to install all required tools, especially on non-Linux platforms, this project comes with a containerized (“Docker”) development environment, which you can use like this:
-
Get the source code:
git clone https://github.com/enola-dev/enola.git cd enola
-
Build and enter (prompt) the Dev. Env. container, which includes all required tools, but with the source code “local / on host” mounted:
./devenv.bash
-
(You’re now in the container.) Run the Enola CLI, built from source:
./enola
-
(You’re still in the container.) Build everything and run the tests:
./test.bash
When tests ran fully successfully, then a .git/hooks/pre-commit
that’s useful for development is installed.
Documentation Writing¶
To work on documentation, launch:
tools/docs/serve-quick.bash
for hot reloading live refresh, which is great while writing (even though it has some limitations)tools/docs/serve-build.bash
for a “real” (full) docs build, without without the demo “screen cast” recordings (which are slow)tools/docs/serve.bash
for generating the “real” (full) staticsite/
exactly as it’s deployed on https://docs.enola.dev
Manual Tools Installation¶
This may be out of date (please help to update it) - it’s just so much easier to use the above!
If you do still want to try, here’s how to manually install what the development environment container comes built-in with:
- Install Java Development Kit (JDK), same version as in
.bazelrc
. There are different Java (like Linux) “distributions” (all based on OpenJDK). The easiest way to install one of them is typically to use your OS’ package manager:sudo apt-get install openjdk-21-jdk openjdk-21-doc openjdk-21-source
An alternative is to use e.g. the SDKMAN!
If you work on several projects using different Java versions,
then we recommend using something like
jEnv (with .java-version
), or
asdf (with .tool-versions
), or
direnv (with .envrc
).
-
Install C/C++ etc. (it’s required by the Proto rule for Bazel), e.g. do:
sudo apt-get install build-essential
-
Install Python venv (it’s used by the presubmit and docs site generation), e.g. with:
sudo apt-get install python3-venv
-
Install Bazelisk (NOT Bazel), on a (recent enough…) Debian/Ubuntu with Go e.g. like this (or some more manual equivalent):
sudo apt update sudo apt install golang-go
You should now be able to proceed as above (but without requiring Docker).
Further Reading¶
You can now read more about: