From 6b35bcc515b0bf4d5c82da487baf7827dfec75c7 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 17 Nov 2021 23:32:09 +0100 Subject: [PATCH 1/4] Replace * with - --- ChangeLog.md | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 81540161bd..b80fc6350e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -701,34 +701,34 @@ Here are the summary of changes: Haskell Language Server 1.1.0 has finally come! Many thanks to all contributors -- since the last release, we have merged over 100 PRs! As always, there are many internal bug fixes and performance improvements in ghcide. Apart from that, -* Wingman gets many enhancements, thanks to @isovector for this epic work! - * Wingman actions can now be bound to editor hotkeys - * Experimental support for "jump to next unsolved hole" - * Improved layout algorithm --- don't reflow instances, or break do-blocks - * Wingman can now deal with GADTs, rank-n types and pattern synonyms - * Wingman now respects user-written bindings on the left side of the equals sign - * Significantly more-natural synthesized code when dealing with newtypes, infix operators, records and strings - * Improved user experience --- less waiting, and friendly errors for when things go wrong -* hlint plugin not working in some cases gets fixed -* annoying log message "haskell-lsp:incoming message parse error" gets fixed in `lsp-1.2` -* eval plugin now supports `it` variable, like GHCi -* verbose message "No cradle found for ... Proceeding with implicit cradle" is GONE -* type lenses plugin now has its custom config `mode` (enum) [`always`] to control its working mode: - * `always`: always displays type signature lenses of global bindings - * `exported`: similar to `always`, but only displays for exported global bindings - * `diagnostics`: follows diagnostic messages produced by GHC -* top-level LSP option `completionSnippetsOn` and `maxNumberOfProblems` are deprecated -* completions plugin now has its custom config: - * `autoExtendOn` (boolean) [`true`]: whether to enable auto extending import lists - * `snippetsOn` (boolean) [`true`]: wheter to enable completion snippets, taking the place of `completionSnippetsOn` -* Wingman has its custom config: - * `timeout_duration` (integer) [`2`]: the timeout for Wingman actions, in seconds - * `features` (string) [`""`]: feature set used by Wingman (See [the README of Wingman](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin#readme)) - * `max_use_ctor_actions` (integer) [`5`]: maximum number of `Use constructor ` code actions that can appear - * `hole_severity` (enum) [`none`]: the severity to use when showing hole diagnostics -* LSP symbols of typeclass and type families are more appropriate -* test suite of plugins are reorganized, which no longer need to be run with `test-server` executable -* two new packages `hls-test-utils` and `hls-stylish-haskell-plugin` are extracted +- Wingman gets many enhancements, thanks to @isovector for this epic work! + - Wingman actions can now be bound to editor hotkeys + - Experimental support for "jump to next unsolved hole" + - Improved layout algorithm --- don't reflow instances, or break do-blocks + - Wingman can now deal with GADTs, rank-n types and pattern synonyms + - Wingman now respects user-written bindings on the left side of the equals sign + - Significantly more-natural synthesized code when dealing with newtypes, infix operators, records and strings + - Improved user experience --- less waiting, and friendly errors for when things go wrong +- hlint plugin not working in some cases gets fixed +- annoying log message "haskell-lsp:incoming message parse error" gets fixed in `lsp-1.2` +- eval plugin now supports `it` variable, like GHCi +- verbose message "No cradle found for ... Proceeding with implicit cradle" is GONE +- type lenses plugin now has its custom config `mode` (enum) [`always`] to control its working mode: + - `always`: always displays type signature lenses of global bindings + - `exported`: similar to `always`, but only displays for exported global bindings + - `diagnostics`: follows diagnostic messages produced by GHC +- top-level LSP option `completionSnippetsOn` and `maxNumberOfProblems` are deprecated +- completions plugin now has its custom config: + - `autoExtendOn` (boolean) [`true`]: whether to enable auto extending import lists + - `snippetsOn` (boolean) [`true`]: wheter to enable completion snippets, taking the place of `completionSnippetsOn` +- Wingman has its custom config: + - `timeout_duration` (integer) [`2`]: the timeout for Wingman actions, in seconds + - `features` (string) [`""`]: feature set used by Wingman (See [the README of Wingman](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin#readme)) + - `max_use_ctor_actions` (integer) [`5`]: maximum number of `Use constructor ` code actions that can appear + - `hole_severity` (enum) [`none`]: the severity to use when showing hole diagnostics +- LSP symbols of typeclass and type families are more appropriate +- test suite of plugins are reorganized, which no longer need to be run with `test-server` executable +- two new packages `hls-test-utils` and `hls-stylish-haskell-plugin` are extracted This version uses `lsp-1.2.0`, `hls-plugin-api-1.1.0`, and `ghcide-1.2.0.2`. From 2ea52eea1567fce196ce7f37b5b285aaeec2cc51 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 18 Nov 2021 18:14:33 +0100 Subject: [PATCH 2/4] Use parsed module with comments --- plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs b/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs index 5852c0b9af..e6784ec502 100644 --- a/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs +++ b/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs @@ -237,14 +237,14 @@ getIdeas nfp = do where moduleEx :: ParseFlags -> Action (Maybe (Either ParseError ModuleEx)) #ifndef HLINT_ON_GHC_LIB moduleEx _flags = do - mbpm <- getParsedModule nfp + mbpm <- getParsedModuleWithComments nfp return $ createModule <$> mbpm where createModule pm = Right (createModuleEx anns modu) where anns = pm_annotations pm modu = pm_parsed_source pm #else moduleEx flags = do - mbpm <- getParsedModule nfp + mbpm <- getParsedModuleWithComments nfp -- If ghc was not able to parse the module, we disable hlint diagnostics if isNothing mbpm then return Nothing From 5085453309a1527a5e3cc44eca831e2c54869ffa Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 18 Nov 2021 21:01:00 +0100 Subject: [PATCH 3/4] Correct issue id --- plugins/hls-hlint-plugin/test/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hls-hlint-plugin/test/Main.hs b/plugins/hls-hlint-plugin/test/Main.hs index 19619dcffb..41003e922e 100644 --- a/plugins/hls-hlint-plugin/test/Main.hs +++ b/plugins/hls-hlint-plugin/test/Main.hs @@ -131,7 +131,7 @@ suggestionsTests = doc <- openDoc "IgnoreAnn.hs" "haskell" expectNoMoreDiagnostics 3 doc "hlint" - , knownBrokenForHlintOnRawGhc "[#838] hlint plugin doesn't honour HLINT annotations" $ + , knownBrokenForHlintOnRawGhc "[#638] hlint plugin doesn't honour HLINT annotations" $ testCase "hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession "" $ do doc <- openDoc "IgnoreAnnHlint.hs" "haskell" expectNoMoreDiagnostics 3 doc "hlint" From 90ed2f5aefaac92b433f0525a567b7f90b7da0c7 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 18 Nov 2021 21:03:45 +0100 Subject: [PATCH 4/4] Remove unknown broken for #638, #2042 and #2280 --- plugins/hls-hlint-plugin/test/Main.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/hls-hlint-plugin/test/Main.hs b/plugins/hls-hlint-plugin/test/Main.hs index 41003e922e..844fc599ef 100644 --- a/plugins/hls-hlint-plugin/test/Main.hs +++ b/plugins/hls-hlint-plugin/test/Main.hs @@ -131,8 +131,7 @@ suggestionsTests = doc <- openDoc "IgnoreAnn.hs" "haskell" expectNoMoreDiagnostics 3 doc "hlint" - , knownBrokenForHlintOnRawGhc "[#638] hlint plugin doesn't honour HLINT annotations" $ - testCase "hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession "" $ do + , testCase "hlint diagnostics ignore hints honouring HLINT annotations" $ runHlintSession "" $ do doc <- openDoc "IgnoreAnnHlint.hs" "haskell" expectNoMoreDiagnostics 3 doc "hlint" @@ -158,8 +157,7 @@ suggestionsTests = liftIO $ not (hasApplyAll thirdLine) @? "Unexpected apply all code action" liftIO $ hasApplyAll multiLine @? "Missing apply all code action" - , knownBrokenForHlintOnRawGhc "[#2042] maybe hlint is ignoring pragmas" $ - testCase "hlint should warn about unused extensions" $ runHlintSession "unusedext" $ do + , testCase "hlint should warn about unused extensions" $ runHlintSession "unusedext" $ do doc <- openDoc "UnusedExtension.hs" "haskell" diags@(unusedExt:_) <- waitForDiagnosticsFromSource doc "hlint" @@ -174,8 +172,7 @@ suggestionsTests = waitForAllProgressDone -- hlint will report a parse error if PatternSynonyms is enabled expectNoMoreDiagnostics 3 doc "hlint" - , knownBrokenForHlintOnRawGhc "[#2280] maybe hlint is ignoring pragmas" $ - testCase "hlint should not warn about redundant irrefutable pattern with LANGUAGE Strict" $ runHlintSession "" $ do + , testCase "hlint should not warn about redundant irrefutable pattern with LANGUAGE Strict" $ runHlintSession "" $ do doc <- openDoc "StrictData.hs" "haskell" waitForAllProgressDone