Skip to content

Commit

Permalink
Improve following Github discussions
Browse files Browse the repository at this point in the history
* Add stack.yaml to install/ folder
* Add Stack and Cabal templates for hie.yaml for install/ folder
* Add and cleanup documentation about hie.yaml
* Add comment about building for Stack
  • Loading branch information
sir4ur0n committed Jun 5, 2020
1 parent 3e10ae3 commit 27d3557
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,27 @@ args = ["--lsp"]

### Hacking on haskell-language-server

Haskell-language-server can be used on its own project. We have supplied
preset samples of `hie.yaml` files for stack and cabal, simply copy
the appropriate template to `hie.yaml` and it should work.
Haskell-language-server can be used on itself. We provide
preset samples of `hie.yaml` for Cabal and Stack.

- `hie.yaml.cbl` for cabal
- `hie.yaml.stack` for stack
Note: the `./install/` folder is not directly tied to the project so it has dedicated `./install/hie.yaml.[cbl|stack]`
templates.

Two sample `hie.yaml` files are provided, `hie.yaml.stack` for stack
usage, `hie.yaml.cbl` for cabal. Simply copy the relevant one to be
`hie.yaml` and it should work.
#### Using Cabal

The developers tend to hang out at [our IRC channel](https://webchat.freenode.net/?channels=haskell-ide-engine) at `#haskell-ide-engine` on `freenode`.
```shell
$ cp hie.yaml.cbl hie.yaml
$ cp install/hie.yaml.cbl install/hie.yaml
```

#### Using Stack

Note: Stack project must also be built once until [this issue](https://github.com/commercialhaskell/stack/issues/5213) is fixed.

```shell
$ cp hie.yaml.stack hie.yaml
$ cp install/hie.yaml.stack install/hie.yaml
$ stack build --test --no-run-tests
$ cd install
$ stack build
```
3 changes: 0 additions & 3 deletions hie.yaml.cbl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ cradle:
- path: "./test/testdata/"
config: { cradle: { none: } }

- path: "./install/"
config: { cradle: { none: } }

- path: "./"
config:
cradle:
Expand Down
3 changes: 0 additions & 3 deletions hie.yaml.stack
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ cradle:
- path: "./test/testdata/"
config: { cradle: { none: } }

- path: "./install/"
config: { cradle: { none: } }

- path: "./"
config:
cradle:
Expand Down
3 changes: 3 additions & 0 deletions install/hie.yaml.cbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cradle:
cabal:
component: "lib:hls-install"
3 changes: 3 additions & 0 deletions install/hie.yaml.stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cradle:
stack:
component: "hls-install:lib"
13 changes: 13 additions & 0 deletions install/stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resolver: lts-14.27 # Last 8.6.5

packages:
- .

extra-deps:
- cabal-install-parsers-0.3.0.1
- Cabal-3.2.0.0
- binary-instances-1.0.0.1
- lukko-0.1.1.2

nix:
packages: [ icu libcxx zlib ]

0 comments on commit 27d3557

Please sign in to comment.