Skip to content

Commit c94b45e

Browse files
committed
Update multi-cradle instructions
1 parent 84e645c commit c94b45e

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ we talk to clients.__
3131
- [Download the source code](#download-the-source-code)
3232
- [Building](#building)
3333
- [Install via cabal](#install-via-cabal)
34+
- [Install cabal using stack](#install-cabal-using-stack)
3435
- [Install specific GHC Version](#install-specific-ghc-version)
3536
- [Multiple versions of HIE (optional)](#multiple-versions-of-hie-optional)
3637
- [Configuration](#configuration)
@@ -68,6 +69,8 @@ we talk to clients.__
6869
- [Otherwise](#otherwise)
6970
- [Nix: cabal-helper, No such file or directory](#nix-cabal-helper-no-such-file-or-directory)
7071
- [Liquid Haskell](#liquid-haskell)
72+
- [Profiling `haskell-ide-engine`.](#profiling-haskell-ide-engine)
73+
- [Using `ghc-events-analyze`](#using-ghc-events-analyze)
7174

7275
## Features
7376

@@ -313,7 +316,9 @@ describes how to setup the environment. For example, to explicitly state
313316
that you want to use `stack` then the configuration file would look like:
314317

315318
```yaml
316-
cradle: {stack}
319+
cradle:
320+
stack:
321+
component: "haskell-ide-engine:lib"
317322
```
318323
319324
If you use `cabal` then you probably need to specify which component you want
@@ -325,6 +330,49 @@ cradle:
325330
component: "lib:haskell-ide-engine"
326331
```
327332

333+
If you have a project with multiple components, you can use a cabal-multi
334+
cradle:
335+
336+
```yaml
337+
cradle:
338+
cabal:
339+
- path: "./test/dispatcher/"
340+
component: "test:dispatcher-test"
341+
- path: "./test/functional/"
342+
component: "test:func-test"
343+
- path: "./test/unit/"
344+
component: "test:unit-test"
345+
- path: "./hie-plugin-api/"
346+
component: "lib:hie-plugin-api"
347+
- path: "./app/MainHie.hs"
348+
component: "exe:hie"
349+
- path: "./app/HieWrapper.hs"
350+
component: "exe:hie-wrapper"
351+
- path: "./"
352+
component: "lib:haskell-ide-engine"
353+
```
354+
355+
Equivalently, you can use stack:
356+
357+
```yaml
358+
cradle:
359+
stack:
360+
- path: "./test/dispatcher/"
361+
component: "haskell-ide-engine:test:dispatcher-test"
362+
- path: "./test/functional/"
363+
component: "haskell-ide-engine:test:func-test"
364+
- path: "./test/unit/"
365+
component: "haskell-ide-engine:test:unit-test"
366+
- path: "./hie-plugin-api/"
367+
component: "hie-plugin-api:lib"
368+
- path: "./app/MainHie.hs"
369+
component: "haskell-ide-engine:exe:hie"
370+
- path: "./app/HieWrapper.hs"
371+
component: "haskell-ide-engine:exe:hie-wrapper"
372+
- path: "./"
373+
component: "haskell-ide-engine:lib"
374+
```
375+
328376
Or you can explicitly state the program which should be used to collect
329377
the options by supplying the path to the program. It is interpreted
330378
relative to the current working directory if it is not an absolute path.
@@ -342,8 +390,7 @@ cradle:
342390
cabal:
343391
component: "optional component name"
344392
stack:
345-
bazel:
346-
obelisk:
393+
component: "optional component name"
347394
bios:
348395
program: "program to run"
349396
dependency-program: "optional program to run"

0 commit comments

Comments
 (0)