-
Clone the repository:
$ git clone git@github.com:NorfairKing/smos.git --recursive
If you've already cloned the repository but forgot about the
--recursive
flag, you can run this:$ git submodule update --init --recursive
-
We use Nix for CI and deployment. Make sure you can run
nix develop
. This also ensures that the pre-commit hooks are installed. -
We use stack for development. Make sure you can run
stack test smos
after following the steps in the stack installation guide. -
Checkout the
development
branch:$ git checkout development
-
Enter the nix shell
$ nix develop
-
Set up your feedback loop. When developing in a single smos package, you can use
nix $ stack test <thepackage> --pedantic --file-watch
When developing accross multiple smos packages, you can use
nix $ stack test --pedantic --file-watch --no-rerun-tests
Some feedback loops are provided, as you should have seen when you ran
nix develop
. You may want to check if those fit your needs first. -
Optionally: Set up a local hoogle server to look up code documentation for smos or its dependencies:
nix $ hoogle serve --local
-
Make your changes.
-
Make sure the following commands succeeds locally:
nix $ stack clean nix $ stack build --test --bench --no-run-benchmarks --pedantic`
-
Make sure
nix flake check
succeeds locally. -
Create a pull request with
NorfairKing/development
as the base.