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
{{ message }}
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: docs/Build.md
+26-7Lines changed: 26 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,20 @@
2
2
3
3
`haskell-ide-engine` is built using the library `shake`. The build descriptions are defined in the file `install.hs`.
4
4
5
-
### Design decisions
5
+
Previously, `haskell-ide-engine` was built using a `Makefile` on Unix systems and a `PowerShell` script on Windows. By replacing both scripts by a Haskell-based solution, the build process is unified.
6
6
7
-
The design of the build system follows 2 main goals:
7
+
### Design goals
8
8
9
-
* works same on every platform
10
-
* has minimal run-time dependencies: `stack` and `git`
9
+
The design of the build system has the following main goals:
10
+
11
+
* works identically on every platform
12
+
* has minimal run-time dependencies:
13
+
- a working installation of `stack`
14
+
-`git`
11
15
* is completely functional right after simple `git clone`
12
-
* one-stop-shop for all building
16
+
* one-stop-shop for building everything
13
17
14
-
Previously, `haskell-ide-engine` was built using a `Makefile` on Unix systems and a `PowerShell` script on Windows. By replacing both scripts by a Haskell-based solution, the scripts can be can be replaced by a single script.
18
+
See the project's `README` for detailed information about installing `hie`.
15
19
16
20
### Tradeoffs
17
21
@@ -26,6 +30,21 @@ It is necessary to update the `resolver` field of the `shake.yaml` if the .
26
30
27
31
#### `install.hs` installs a GHC
28
32
29
-
Before the code in `install.hs` can be executed, `stack` installs a `GHC`, depending on the `resolver` field in `shake.yaml`. This is a necessary if the `install.hs` should be totally functional right after a fresh `git clone` without further configuration.
33
+
Before the code in `install.hs` can be executed, `stack` installs a `GHC`, depending on the `resolver` field in `shake.yaml`. This is a necessary if the `install.hs` should be completely functional right after a fresh `git clone` without further configuration.
30
34
31
35
This may lead to an extra `GHC` to be installed by `stack` if not all versions of `haskell-ide-engine` are installed.
36
+
37
+
#### `stack` is a build dependency
38
+
39
+
Currently, it is not possible to build all `hie-*` executables automatically without `stack`, since the `install.hs` script is executed by `stack`.
40
+
41
+
Other parts of the script also depend on `stack`:
42
+
43
+
* finding the local install-dir `stack path --local-bin`
44
+
* finding and installing different `ghc` versions
45
+
46
+
#### `install.hs` executes `cabal install Cabal`
47
+
48
+
`ghc-mod` installs `cabal-helper` at runtime depending on the `ghc` used by the project, which can take a long time upon startup of `hie`. The `install.hs` script speeds up this process by calling `cabal install Cabal` upon build.
49
+
50
+
Hopefully, this behaviour can be removed in the future.
0 commit comments