Skip to content

Commit e6c6eaf

Browse files
amitaibumpscholten
andauthored
Improve docs on how to get latest master (#1755)
* Improve docs on how to get latest master * Improve docs * Apply suggestions from code review Co-authored-by: Marc Scholten <[email protected]> --------- Co-authored-by: Marc Scholten <[email protected]>
1 parent 0f186f8 commit e6c6eaf

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

CONTRIBUTING.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,42 @@ To help us with that, you can run this from the root of your project `cd IHP &&
4141

4242
It is important to update your custom `default.nix` file and set the `rev` to the latest commit every time you perform a `git pull` from within IHP. This is because certain components continue to use the version defined in `default.nix`, even if you have a local IHP.
4343

44-
### Alternative method
44+
### Running the latest IHP `master`
4545

46-
Another workflow, instead of the simpler `devenv up`, is to use `make console` to load your application together with the framework located in `IHP`. In a `nix-shell`:
46+
When contributing to IHP core you will want to have your PRs synced with `master`. Your `flake.nix` should have this line:
4747

48-
```
49-
ghci
50-
$ghci> :l Main
48+
```nix
49+
{
50+
ihp.url = "github:digitallyinduced/ihp";
51+
}
5152
```
5253

53-
This will now load your application and all the haskell files in `IHP`.
54-
55-
As we are not using the development tooling for the framework development process we need to manually start the postgres process by running `postgres -D build/db/state -k $PWD/build/db -c "listen_addresses="` in another terminal window.
56-
57-
After postgres is started you can now start the application with the local framework version by running:
54+
Then every time you'd like to update to the latest master, you'll run:
5855

5956
```
60-
main
57+
nix flake update
58+
direnv allow
6159
```
6260

63-
After you have made modifications to files inside `IHP`, you need to press `CTRL + C` to stop the process running in `ghci` and then type `:r` to refresh the haskell modules. Now type `main` to start the server again.
61+
Note that it takes around 30 minutes for the IHP GitHub actions to prepare a binary build of IHP. If you run latest master and the GitHub actions aren't finished yet, you will notice that your computer needs to build IHP from scratch which takes a lot of time. You can wait for the GitHub action to complete or point to a specific IHP commit to avoid long build times.
6462

6563
### Running the development server
6664

67-
When making changes to the development tooling, follow the setup above, except don't start postgres (the IDE starts it automatically).
6865

69-
Instead of starting your application, start the development server:
66+
When making changes to the development tooling, we have to start the server differently, without `devenv up`. We have to
67+
use `make console` to load your application together with the framework located in `IHP`.
7068

7169
```
7270
ghci
7371
:l IHP/exe/IHP/IDE/DevServer.hs
7472
main
7573
```
7674

75+
We don't start postgres as the IDE starts it automatically.
76+
7777
#### Debugging the development server
7878

79-
You can enable additonal debug logging for the development server by setting the env variable `DEBUG=1`. Like this:
79+
You can enable additional debug logging for the development server by setting the env variable `DEBUG=1`. Like this:
8080

8181
```
8282
export DEBUG=1

0 commit comments

Comments
 (0)