You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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]>
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -41,42 +41,42 @@ To help us with that, you can run this from the root of your project `cd IHP &&
41
41
42
42
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.
43
43
44
-
### Alternative method
44
+
### Running the latest IHP `master`
45
45
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:
47
47
48
-
```
49
-
ghci
50
-
$ghci> :l Main
48
+
```nix
49
+
{
50
+
ihp.url = "github:digitallyinduced/ihp";
51
+
}
51
52
```
52
53
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:
58
55
59
56
```
60
-
main
57
+
nix flake update
58
+
direnv allow
61
59
```
62
60
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.
64
62
65
63
### Running the development server
66
64
67
-
When making changes to the development tooling, follow the setup above, except don't start postgres (the IDE starts it automatically).
68
65
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`.
70
68
71
69
```
72
70
ghci
73
71
:l IHP/exe/IHP/IDE/DevServer.hs
74
72
main
75
73
```
76
74
75
+
We don't start postgres as the IDE starts it automatically.
76
+
77
77
#### Debugging the development server
78
78
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:
0 commit comments