|
1 | 1 | # Troubleshooting
|
2 | 2 |
|
| 3 | +## Issues with building and garbage-collection |
| 4 | + |
| 5 | +### Why am I building GHC? |
| 6 | + |
| 7 | +It's easier to list the reverse: when will you *not* build GHC? |
| 8 | + |
| 9 | +- You have configured the [binary cache](tutorials/getting-started.md) correctly. |
| 10 | +- You are using one of the GHC versions which [we support](reference/supported-ghc-versions.md). |
| 11 | +- You are using one of the nixpkgs versions used by our CI (you can access the sources for these [through haskell.nix](tutorials/getting-started.md). |
| 12 | + |
| 13 | +If you think you are doing all of these and you still find you're building GHC, drop us a line. |
| 14 | + |
| 15 | +### Why am I building lots of Haskell packages? |
| 16 | + |
| 17 | +We don't generally cache much of Hackage (there's a lot of it!), except for the parts which are used by our tests. |
| 18 | +So this is expected, unfortunately. |
| 19 | + |
| 20 | +### How do I prevent the evaluation-time dependencies of my project from being garbage-collected? |
| 21 | + |
| 22 | +The `haskell-nix.roots "ghc884"` should include all the evaluation-time dependencies |
| 23 | +and the main build time dependencies of a project using ghc 8.8.4. |
| 24 | +So you can add that to the relevant GC root. |
| 25 | +In practice, if you're using a CI system like Hydra/Hercules, this means adding it to a job in `release.nix`/`ci.nix`. |
| 26 | + |
3 | 27 | ## General troubleshooting when using `cabalProject`/`stackProject`/`project`
|
4 | 28 |
|
5 | 29 | ### Does the cabal/stack build work?
|
@@ -46,27 +70,3 @@ Where possible, try to do the configuration in your cabal/stack configuration, e
|
46 | 70 | This will ensure that the two builds agree.
|
47 | 71 |
|
48 | 72 | If you want or need to set some of them in Nix, try bringing the two into sync temporarily for troubleshooting.
|
49 |
| - |
50 |
| -## Specific issues |
51 |
| - |
52 |
| -### Why am I building GHC? |
53 |
| - |
54 |
| -It's easier to list the reverse: when will you *not* build GHC? |
55 |
| - |
56 |
| -- You have configured the [binary caches](tutorials/getting-started.md) correctly. |
57 |
| -- You are using one of the GHC versions built by our CI (have a look in [ci.nix](../ci.nix) to see what gets built). |
58 |
| -- You are using one of the nixpkgs versions used by our CI (you can access the sources for these [through haskell.nix](tutorials/getting-started.md). |
59 |
| - |
60 |
| -If you think you are doing all of these and you still find you're building GHC, drop us a line. |
61 |
| - |
62 |
| -### Why am I building lots of Haskell packages? |
63 |
| - |
64 |
| -We don't generally cache much of Hackage (there's a lot of it!), except for the parts which are used by our tests. |
65 |
| -So this is expected, unfortunately. |
66 |
| - |
67 |
| -### How do I prevent the evaluation-time dependencies of my project from being garbage-collected? |
68 |
| - |
69 |
| -The `haskell-nix.roots "ghc884"` should include all the evaluation-time dependencies |
70 |
| -and the main build time dependencies of a project using ghc 8.8.4. |
71 |
| -So you can add that to the relevant GC root. |
72 |
| -In practice, if you're using a CI system like Hydra/Hercules, this means adding it to a job in `release.nix`/`ci.nix`. |
0 commit comments