Skip to content

Add ghc deprecation policy to documentation #2231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/ghc-deprecation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# GHC support deprecation policy

- `haskell-language-server`(HLS) is highly tied to ghc api so much so that it needs a specific flavour for each ghc minor version to ensure it will work in a reliable way
- It supposes the codebase is riddled with code conditioned to each supported ghc versions. It even needs entire packages to fully support older versions of ghc.
- Our continouos integracion setup has to cover all those cases so it have to use lot of resources to test and build the executable.
- So we need to limit the ghc support to save maintainers and contributors time and reduce ci resources consumption. It becomes vital to make HLS development manageable.
- At same time we aim to support the right balance of ghc versions to minimize impact to final users who usually needs to keep using older ghc versions, even if they are out of the window support offered by ghc itself.
- To establish the policy and the possible exceptions we aim to take in account:
- completeness of support: the GHC flavour should include all plugins and features
- ghc versions supported by newer [stackage](https://www.stackage.org/) LTS's
- ghc versions supported by default in the most popular [linux distributions](https://repology.org/project/ghc/versions)
- the specific history of ghc releases and their realibility on the major operating systems (linux, windows, macos)
- It worths to note that users of deprecated ghc versions always will have the option of:
- Continue using the last HLS with support for their ghc version. So they will miss new bug fixes and features.
- For deprecated minor versions of a still supported major version, try to build HLS from source.
- We will not guarentee it will work but will do quite likely.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `haskell-language-server`(HLS) is highly tied to ghc api so much so that it needs a specific flavour for each ghc minor version to ensure it will work in a reliable way
- It supposes the codebase is riddled with code conditioned to each supported ghc versions. It even needs entire packages to fully support older versions of ghc.
- Our continouos integracion setup has to cover all those cases so it have to use lot of resources to test and build the executable.
- So we need to limit the ghc support to save maintainers and contributors time and reduce ci resources consumption. It becomes vital to make HLS development manageable.
- At same time we aim to support the right balance of ghc versions to minimize impact to final users who usually needs to keep using older ghc versions, even if they are out of the window support offered by ghc itself.
- To establish the policy and the possible exceptions we aim to take in account:
- completeness of support: the GHC flavour should include all plugins and features
- ghc versions supported by newer [stackage](https://www.stackage.org/) LTS's
- ghc versions supported by default in the most popular [linux distributions](https://repology.org/project/ghc/versions)
- the specific history of ghc releases and their realibility on the major operating systems (linux, windows, macos)
- It worths to note that users of deprecated ghc versions always will have the option of:
- Continue using the last HLS with support for their ghc version. So they will miss new bug fixes and features.
- For deprecated minor versions of a still supported major version, try to build HLS from source.
- We will not guarentee it will work but will do quite likely.
`haskell-language-server`(HLS) is highly tied to the ghc api.This imposes a high maintenance cost:
- The codebase is littered with conditional logic,
- We own auxiliary packages to support older versions of ghc.
- CI has to cover all the supported versions.
So we need to limit the ghc support to save maintainers and contributors time and reduce CI resources.
At same time we aim to support the right balance of ghc versions to minimize impact to final users.
To establish the policy we take into account:
- completeness: support includes all plugins and features
- The most recent [stackage](https://www.stackage.org/) LTS snapshot
- The GHC versions used in the most popular [linux distributions](https://repology.org/project/ghc/versions)
It is worth noting that users always will have the option of:
- using the last HLS with support for their ghc version.
- build HLS from source.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks cleaner, thanks, but why does it remove the specific history of ghc releases and their realibility...?
I think this is the real reason behind keep 8.6.5 and 8.10.5 and it is previsible that we should take that in account, even being an ambiguous consideration

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it? I thought we are not making any exceptions and therefore not keeping 8.6.5, and for 8.10.5 the reason was a Linux distro.

I removed because it's poorly defined and likely to lead to disagreements, and I don't think it's needed.

Copy link
Member Author

@jneira jneira Sep 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well , we disagree here i think users will like to know we aim to be flexible and will listen their opinion about their use cases and ghc versioning. It is more a statement of principles than a definition.
Maintainers will have always the last word.

## Deprecation policy

- A GHC version is legacy if it is 3 or more major versions away from the newest stackage LTS ghc version
- HLS will build on all non-legacy (major) versions of GHC,
- for the latest major GHC version we will support at least 2 minor versions
- for the rest of major supported GHC versions we will support at least the latest GHC minor version in stackage LTS (so 1 minor version)
- We may extend the existing discovery mechanisms (hls-wrapper, automatic download in vscode extension) to find and download older HLS binaries when it detects a legacy GHC version
- We will warn users about the deprecated ghc version in the notes of the release *prior* to the deprecation itself.

## Deprecation prevision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not the table that our users actually care about. Our users probably want to know which GHC versions are supported now, and how will that change in future.

Maybe that should be a separate table. I suggest something like this (content is random since I don't know off the top of my head!)

GHC version Supported Future status
9.2.* Partial Full support in 1.4.0.0
8.10.{7,6} Y Supported unitil some LTS thing happens
8.6.5 Y Will be deprecated in 1.4.0.0
7.10 N

Then we can link to this policy to explain when support gets dropped.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i am afraid that it will not depend on the hls version itself, only on stackage lts but i got the idea
do you think that separate table should live in that document or in other place more visible?


| newest LTS ghc version | supported ghc versions |
|------------------------|-------------------------------------------------|
| 8.10.7 | 8.10.7, 8.10.6, 8.10.5(\*), 8.8.4, 8.8.3(\*), 8.6.5 |
| 9.0.1 | 9.0.1, 8.10.7, 8.8.4, 8.6.5(\*) |
| 9.0.2 | 9.0.2, 9.0.1, 8.10.7, 8.8.4, 8.6.5(\*) |
| 9.2.0 | 9.2.0, 9.0.2, 8.10.7, 8.8.4 |

- versions with `*` are versions which should be removed accordingly to the policy but we will keep due to the specific history of realibilty of recent ghc versions
- this prevision is not definitive and may vary depending on changes in the criteria listed above (but always honouring the policy)
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
haskell-language-server
=======================

Integration point for `ghcide <https://github.com/haskell/ghcide>`_ and `haskell-ide-engine <https://github.com/haskell/haskell-ide-engine>`_. One IDE to rule
them all. Read the `project's background <https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-them-all.html>`_.
Official haskell ide support via language server (LSP). Successor of `ghcide <https://github.com/haskell/ghcide>`_ and `haskell-ide-engine <https://github.com/haskell/haskell-ide-engine>`_. Read the `project's background <https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-them-all.html>`_.

.. toctree::
:maxdepth: 2

features
installation
configuration
ghc-deprecation
troubleshooting
contributing/index