Skip to content

Commit a9ae9d1

Browse files
fendorhasufellmichaelpj
authored
Delete HLS installer scripts (#2773)
* Delete HLS installer scripts Prefer ghcup for installations from source. * Use simpler ghcup syntax Co-authored-by: Julian Ospald <hasufell@posteo.de> Co-authored-by: Julian Ospald <hasufell@posteo.de> Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
1 parent fbbf76b commit a9ae9d1

23 files changed

+41
-927
lines changed

.github/workflows/bench.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
, "**.md"
2929
, "**/LICENSE"
3030
, ".circleci/**"
31-
, "install/**"
3231
, "**.nix"
3332
, "**/test/**"
3433
, "flake.lock"

.github/workflows/caching.yml

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
paths_ignore: '["**/docs/**"
6464
, "**.md"
6565
, "**/LICENSE"
66-
, "install/**"
6766
, "**.nix"
6867
, "flake.lock"
6968
, "**/README.md"

.github/workflows/flags.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
paths_ignore: '[ "**/docs/**"
2828
, "**.md"
2929
, "**/LICENSE"
30-
, "install/**"
3130
, "**.nix"
3231
, "flake.lock"
3332
, "**/README.md"

.github/workflows/nix.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
, "**.md"
2929
, "**/LICENSE"
3030
, ".circleci/**"
31-
, "install/**"
3231
, "**/README.md"
3332
, "FUNDING.yml"
3433
, "**/stack*.yaml"

.github/workflows/test.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
paths_ignore: '[ "**/docs/**"
2929
, "**.md"
3030
, "**/LICENSE"
31-
, "install/**"
3231
, "**.nix"
3332
, "flake.lock"
3433
, "**/README.md"

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
dist-newstyle
22
.stack-work
33
/hie.yaml
4-
/install/hie.yaml
54
cabal.project.local
65
*~
76
*.lock

cabal-hls-install

-2
This file was deleted.

cabal-hls-install.cmd

-1
This file was deleted.

docs/installation.md

+41-108
Original file line numberDiff line numberDiff line change
@@ -26,65 +26,28 @@ You can check if HLS is available for your platorm via ghcup here: <https://hask
2626
You can also install HLS from source without checking out the code manually:
2727

2828
```bash
29-
ghcup compile hls -v 1.4.0 8.10.7
29+
ghcup compile hls -v 1.6.1.0 --ghc 8.10.7
3030
```
3131

32-
Check `ghcup compile hls --help` for a full list of compilation options.
33-
34-
## chocolatey
35-
36-
If you are using [`chocolatey`](https://chocolatey.org/) to manage your installations in windows, [you can install `haskell-language-server`](https://community.chocolatey.org/packages/haskell-language-server) with
37-
38-
```bash
39-
choco install haskell-language-server
40-
````
41-
42-
## Visual Studio Code
43-
44-
If you are using Visual Studio Code, the [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) will automatically download and install `haskell-language-server` for you.
45-
46-
If you need to find the binaries, please consult the [documentation](https://github.com/haskell/vscode-haskell#downloaded-binaries) for the extension.
47-
48-
## Pre-built binaries
49-
50-
There are pre-built binaries available from the [releases page](https://github.com/haskell/haskell-language-server/releases) for Linux, Windows and macOS.
51-
To install, download the `haskell-language-server-wrapper` executable for your platform as well as any `haskell-language-server` executables for the GHC versions you plan on working with, and either put them on your PATH or point your client to them.
52-
53-
## Arch Linux
54-
55-
The preferred method of installation for development purposes is to use the [haskell-language-server-static](https://aur.archlinux.org/packages/haskell-language-server-static) package from AUR.
56-
This package contains statically linked binaries for each supported GHC version and `haskell-language-server-wrapper` for automatic GHC version selection.
57-
It is updated regularly, requires no additional dependencies, and is independent of other haskell packages you may have on your system, including GHC.
58-
Its size is relatively large (approx. 900 MB), but if this is a problem for you, during installation you can disable the GHC versions you will not be using by editing the PKGBUILD file.
59-
60-
Alternatively, if you want to use **dynamically linked** Haskell packages from `pacman`,
61-
you can install the latest pre-compiled version of `haskell-language-server` from [[community]](https://archlinux.org/packages/community/x86_64/haskell-language-server/):
62-
63-
```bash
64-
sudo pacman -S haskell-language-server
32+
Install HLS for multiple GHC versions:
33+
```
34+
ghcup compile hls -v 1.6.1.0 --ghc 8.10.7 --ghc 8.8.4
6535
```
6636

67-
In this case, `haskell-language-server` is compiled against the GHC distributed to Arch Linux, so you will need maintain a system wide Haskell development environment, and install GHC from `pacman` as well.
68-
See [ArchWiki](https://wiki.archlinux.org/index.php/Haskell) for the details of Haskell infrastructure on Arch Linux.
69-
70-
## Fedora
71-
72-
Binary packages for Fedora are available from [this Copr repo](https://copr.fedorainfracloud.org/coprs/petersen/haskell-language-server),
73-
built against the official Fedora ghc package.
74-
75-
## FreeBSD
76-
77-
HLS is available for installation from official binary packages. Use
78-
79-
```bash
80-
pkg install hs-haskell-language-server
37+
Use a different `cabal.project` for a GHC version:
38+
```
39+
ghcup compile hls -v 1.6.1.0 --ghc 9.2.1 --cabal-project cabal-ghc921.project
8140
```
8241

83-
to install it. At the moment, HLS installed this way only supports the same GHC
84-
version as the ports one.
42+
Check `ghcup compile hls --help` for a full list of compilation options.
8543

8644
## Installation from source
8745

46+
Direct installation from Source, while possible via `cabal install haskell-language-server`
47+
and `stack install --stack-yaml stack-<GHCVER>.yaml`, is not recommended for most people.
48+
Said command builds the `haskell-language-server` binary and installs it in the default Cabal binaries folder,
49+
but the binary will only work with projects that use the same GHC version that built it.
50+
8851
### Common pre-requirements
8952

9053
- `stack` or `cabal` must be in your PATH
@@ -142,87 +105,57 @@ git clone https://github.com/haskell/haskell-language-server --recurse-submodule
142105
cd haskell-language-server
143106
```
144107

145-
### Building
146-
147-
Note, on first invocation of the build script with stack, a GHC is being installed for execution.
148-
The GHC used for the `install.hs` can be adjusted in `./install/stack.yaml` by using a different resolver.
149-
150-
Available commands can be seen with:
151-
152-
```bash
153-
stack ./install.hs help
154-
```
155-
156-
Remember, this will take time to download a Stackage-LTS and an appropriate GHC for build
157-
haskell-language-server the first time.
158-
159-
### Install via cabal
108+
## chocolatey
160109

161-
The install-script can be invoked via `cabal` instead of `stack` with the command
110+
If you are using [`chocolatey`](https://chocolatey.org/) to manage your installations in windows, [you can install `haskell-language-server`](https://community.chocolatey.org/packages/haskell-language-server) with
162111

163112
```bash
164-
cabal v2-run ./install.hs --project-file install/shake.project <target>
165-
```
166-
167-
or using the existing alias script
113+
choco install haskell-language-server
114+
````
168115

169-
```bash
170-
./cabal-hls-install <target>
171-
```
116+
## Visual Studio Code
172117

173-
Running the script with cabal on windows requires a cabal version greater or equal to `3.0.0.0`.
118+
If you are using Visual Studio Code, the [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) will automatically download and install `haskell-language-server` for you.
174119

175-
For brevity, only the `stack`-based commands are presented in the following sections.
120+
If you need to find the binaries, please consult the [documentation](https://github.com/haskell/vscode-haskell#downloaded-binaries) for the extension.
176121

177-
### Install specific GHC Version
122+
## Pre-built binaries
178123

179-
The script will install the executables `haskell-language-server-wrapper` and `haskell-language-server`.
124+
There are pre-built binaries available from the [releases page](https://github.com/haskell/haskell-language-server/releases) for Linux, Windows and macOS.
125+
To install, download the `haskell-language-server-wrapper` executable for your platform as well as any `haskell-language-server` executables for the GHC versions you plan on working with, and either put them on your PATH or point your client to them.
180126

181-
It will copy the latter appending the used ghc version, needed by the wrapper to choose the suitable version
182-
for the project at hand.
127+
## Arch Linux
183128

184-
So installing the executables directly with `stack install` or `cabal v2-install` may not be enough
185-
for it to work properly.
129+
The preferred method of installation for development purposes is to use the [haskell-language-server-static](https://aur.archlinux.org/packages/haskell-language-server-static) package from AUR.
130+
This package contains statically linked binaries for each supported GHC version and `haskell-language-server-wrapper` for automatic GHC version selection.
131+
It is updated regularly, requires no additional dependencies, and is independent of other haskell packages you may have on your system, including GHC.
132+
Its size is relatively large (approx. 900 MB), but if this is a problem for you, during installation you can disable the GHC versions you will not be using by editing the PKGBUILD file.
186133

187-
Install haskell-language-server for the latest available and supported GHC version (and hoogle docs):
134+
Alternatively, if you want to use **dynamically linked** Haskell packages from `pacman`,
135+
you can install the latest pre-compiled version of `haskell-language-server` from [[community]](https://archlinux.org/packages/community/x86_64/haskell-language-server/):
188136

189137
```bash
190-
stack ./install.hs hls
138+
sudo pacman -S haskell-language-server
191139
```
192140

193-
Install haskell-language-server for a specific GHC version (and hoogle docs):
141+
In this case, `haskell-language-server` is compiled against the GHC distributed to Arch Linux, so you will need maintain a system wide Haskell development environment, and install GHC from `pacman` as well.
142+
See [ArchWiki](https://wiki.archlinux.org/index.php/Haskell) for the details of Haskell infrastructure on Arch Linux.
194143

195-
```bash
196-
stack ./install.hs hls-8.10.7
197-
```
144+
## Fedora
198145

199-
`hls-8.10.7` target will build the project and install `haskell-language-server-wrapper`,
200-
`haskell-language-server` and `haskell-language-server-8.10.7` executables.
146+
Binary packages for Fedora are available from [this Copr repo](https://copr.fedorainfracloud.org/coprs/petersen/haskell-language-server),
147+
built against the official Fedora ghc package.
201148

202-
The Haskell Language Server can also be built with `cabal v2-build` instead of `stack build`.
203-
This has the advantage that you can decide how the GHC versions have been installed.
204-
To see what GHC versions are available, the command `cabal-hls-install ghcs` can be used.
205-
It will list all *supported* GHC versions that are on the path for build with their respective installation directory.
206-
If you think, this list is incomplete, you can try to modify the PATH variable, such that the executables can be found.
207-
Note, that the targets `hls` and `data` depend on the found GHC versions.
149+
## FreeBSD
208150

209-
An example output is:
151+
HLS is available for installation from official binary packages. Use
210152

211153
```bash
212-
> ./cabal-hls-install ghcs
213-
******************************************************************
214-
Found the following GHC paths:
215-
ghc-8.6.5: /opt/bin/ghc-8.6.5
216-
ghc-8.8.4: /opt/bin/ghc-8.8.4
217-
218-
******************************************************************
154+
pkg install hs-haskell-language-server
219155
```
220156

221-
If your desired ghc has been found, you use it to install haskell-language-server.
222-
223-
```bash
224-
./cabal-hls-install hls-8.6.5
225-
```
157+
to install it. At the moment, HLS installed this way only supports the same GHC
158+
version as the ports one.
226159

227160
## Installation from Hackage
228161

install.hs

-21
This file was deleted.

install/README.md

-8
This file was deleted.

install/cabal.project

-2
This file was deleted.

install/hls-install.cabal

-52
This file was deleted.

install/shake.project

-2
This file was deleted.

install/src/BuildSystem.hs

-17
This file was deleted.

0 commit comments

Comments
 (0)