Skip to content
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

Warn GHC 9 Compatibility to LSP Client #1992

Merged
merged 18 commits into from Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -140,7 +140,7 @@ ghcup install hls
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
```
choco install haskell-language-server
````
````

### Visual Studio Code

Expand Down Expand Up @@ -703,6 +703,11 @@ args = ["--lsp"]

## Known limitations

### Limited GHC 9 Support
Currently, GHC 9 support in HLS is in beta stage; some features are unavailable with GHC >= 9.0.1 for the time being.
This situation is expected to be resolved in the near future after all the dependent packages support GHC 9.
See issue [#297](https://github.com/haskell/haskell-language-server/issues/297) for the supported features in GHC 9 and the status of migration progress.

### Preprocessor
HLS is not yet able to find project preprocessors, which may result in `could not execute: <preprocessor>` errors. This problem is
tracked in https://github.com/haskell/haskell-language-server/issues/176 and originally comes from https://github.com/mpickering/hie-bios/issues/125
Expand Down
8 changes: 7 additions & 1 deletion ghcide/src/Development/IDE/Main.hs
Expand Up @@ -25,7 +25,8 @@ import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Text.Lazy.Encoding (decodeUtf8)
import qualified Data.Text.Lazy.IO as LT
import Development.IDE (Action, Rules,
import Development.IDE (Action, GhcVersion (..),
Rules, ghcVersion,
hDuplicateTo')
import Development.IDE.Core.Debouncer (Debouncer,
newAsyncDebouncer)
Expand Down Expand Up @@ -256,6 +257,11 @@ defaultMain Arguments{..} = do
, optRunSubset = runSubset
}
caps = LSP.resClientCapabilities env
-- FIXME: Remove this after GHC 9 gets fully supported
when (ghcVersion == GHC90) $
hPutStrLn stderr $
"Currently, HLS supports GHC 9 only partially. "
<> "See [issue #297](https://github.com/haskell/haskell-language-server/issues/297) for more detail."
initialise
argsDefaultHlsConfig
rules
Expand Down