|
| 1 | +# Supported GHC versions |
| 2 | + |
| 3 | +## Current GHC version support status |
| 4 | + |
| 5 | +The current support for different GHC versions is given in the following table. |
| 6 | + |
| 7 | +| GHC version | Last supporting HLS version | Deprecation status | |
| 8 | +| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | |
| 9 | +| 9.2.0 | not supported yet | | |
| 10 | +| 9.0.1 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | | |
| 11 | +| 8.10.7 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | | |
| 12 | +| 8.10.6 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS for ghc-9.0 | |
| 13 | +| 8.10.5 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | deprecated, will be removed after 1.5.0 | |
| 14 | +| 8.10.4 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated | |
| 15 | +| 8.10.3 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated | |
| 16 | +| 8.10.2 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated | |
| 17 | +| 8.10.1 | [0.9.0](https://github.com/haskell/haskell-language-server/releases/tag/0.9.0) | deprecated | |
| 18 | +| 8.8.4 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS for ghc-9.2 | |
| 19 | +| 8.8.3 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | deprecated, will be removed after 1.5.0 | |
| 20 | +| 8.8.2 | [1.2.0](https://github.com/haskell/haskell-language-server/releases/tag/1.2.0) | deprecated | |
| 21 | +| 8.6.5 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS for ghc-9.2 | |
| 22 | +| 8.6.4 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated | |
| 23 | + |
| 24 | +GHC versions not in the list have never been supported by HLS, or are not planned. |
| 25 | + |
| 26 | +The policy for when we deprecate support for versions of GHC is given below. The table reflects that, but we may decide to deviate from it for good reasons. |
| 27 | + |
| 28 | +### Using deprecated GHC versions |
| 29 | + |
| 30 | +Users who want to use a GHC version which is not supported by the latest HLS can still use older versions of HLS (consult the version support table above to identify the appropriate HLS version). |
| 31 | +In the future, we may extend the existing discovery mechanisms (`haskell-language-server-wrapper`, automatic download in vscode extension) to find and download older HLS binaries in this case. |
| 32 | + |
| 33 | +Users of a deprecated minor version (where the major version is still supported) can try building the latest HLS from source, which will likely still work, since the GHC API tends to remain compatible across minor versions. |
| 34 | + |
| 35 | +## GHC version deprecation policy |
| 36 | + |
| 37 | +### Major versions |
| 38 | + |
| 39 | +A major GHC version is a "legacy" version if it is 3 or more major versions behind the GHC version used in the newest Stackage LTS. HLS will support all non-legacy major versions of GHC. |
| 40 | + |
| 41 | +### Minor versions |
| 42 | + |
| 43 | +For the latest supported major GHC version we will support at least 2 minor versions. |
| 44 | + |
| 45 | +For the rest of the supported major GHC versions, we will support at least the latest minor version in Stackage LTS (so 1 minor version). |
| 46 | + |
| 47 | +### Announcements |
| 48 | + |
| 49 | +We will warn users about the upcoming deprecation of a GHC version in the notes of the release *prior* to the deprecation itself. |
| 50 | + |
| 51 | +### Why deprecate older versions of GHC? |
| 52 | + |
| 53 | +`haskell-language-server` is highly tied to the GHC API, so much so that it needs to be specially built for each GHC minor version to ensure it will work reliably. |
| 54 | +This means that the codebase is riddled with CPP to handle each supported ghc versions. It even needs entire compatibility packages to fully support older versions of GHC. |
| 55 | +Moreover, our continuous integration setup has to cover all of those cases, which uses a lot of resources. |
| 56 | + |
| 57 | +So we need to limit the number of versions of GHC that we support in order to save maintainers and contributors time and to reduce the consumption of CI resources. |
| 58 | +This is vital to make HLS development manageable. |
| 59 | + |
| 60 | +At the same time we aim to support enough GHC versions to minimize the impact on end users. |
| 61 | +This includes making an effort to support users who need to keep using old GHC versions, even if they are out of the support window offered by GHC itself. |
| 62 | + |
| 63 | +### What factors do we take into account when deprecating a version? |
| 64 | + |
| 65 | +To guide the policy (and possible exceptions) we aim to take in account: |
| 66 | +- Completeness of support: all plugins and features should work with that GHC version |
| 67 | +- GHC versions supported by newer [Stackage](https://www.stackage.org/) LTS's |
| 68 | +- GHC versions supported by default in the most popular [Linux distributions](https://repology.org/project/ghc/versions) |
| 69 | +- The specific history of GHC releases and their reliability on the major operating systems (Linux, Windows, MacOS) |
0 commit comments