From ceff4ce7002c1f09f54b08532ef6d8969fa34817 Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sat, 2 Jan 2021 20:19:34 +0800 Subject: [PATCH 1/2] Bump haskell-lsp to 0.23 --- ghcide/ghcide.cabal | 4 ++-- .../src/Development/IDE/Plugin/Completions/Logic.hs | 12 ++++++------ haskell-language-server.cabal | 4 ++-- hls-plugin-api/hls-plugin-api.cabal | 2 +- plugins/default/src/Ide/Plugin/Example.hs | 2 +- plugins/default/src/Ide/Plugin/Example2.hs | 2 +- plugins/default/src/Ide/Plugin/Pragmas.hs | 2 +- plugins/tactics/hls-tactics-plugin.cabal | 2 +- stack-8.6.4.yaml | 4 ++-- stack-8.6.5.yaml | 4 ++-- stack-8.8.2.yaml | 4 ++-- stack.yaml | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index ec1d42774a..6dbecda1c3 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -53,8 +53,8 @@ library Glob, haddock-library >= 1.8, hashable, - haskell-lsp-types == 0.22.*, - haskell-lsp == 0.22.*, + haskell-lsp-types == 0.23.*, + haskell-lsp == 0.23.*, hie-compat, hls-plugin-api, lens, diff --git a/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs b/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs index 2d91e297ff..fc20aa666c 100644 --- a/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs +++ b/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs @@ -157,7 +157,7 @@ mkCompl :: IdeOptions -> CompItem -> CompletionItem mkCompl IdeOptions{..} CI{compKind,insertText, importedFrom,typeText,label,docs, additionalTextEdits} = CompletionItem {_label = label, _kind = kind, - _tags = List [], + _tags = Nothing, _detail = (colon <>) <$> typeText, _documentation = documentation, _deprecated = Nothing, @@ -237,13 +237,13 @@ mkNameCompItem origName origMod thingType isInfix docs !imp = CI{..} mkModCompl :: T.Text -> CompletionItem mkModCompl label = - CompletionItem label (Just CiModule) (List []) Nothing + CompletionItem label (Just CiModule) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing mkImportCompl :: T.Text -> T.Text -> CompletionItem mkImportCompl enteredQual label = - CompletionItem m (Just CiModule) (List []) (Just label) + CompletionItem m (Just CiModule) Nothing (Just label) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing where @@ -251,13 +251,13 @@ mkImportCompl enteredQual label = mkExtCompl :: T.Text -> CompletionItem mkExtCompl label = - CompletionItem label (Just CiKeyword) (List []) Nothing + CompletionItem label (Just CiKeyword) Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing mkPragmaCompl :: T.Text -> T.Text -> CompletionItem mkPragmaCompl label insertText = - CompletionItem label (Just CiKeyword) (List []) Nothing + CompletionItem label (Just CiKeyword) Nothing Nothing Nothing Nothing Nothing Nothing Nothing (Just insertText) (Just Snippet) Nothing Nothing Nothing Nothing Nothing @@ -272,7 +272,7 @@ extendImportList name lDecl = let -- use to same start_pos to handle situation where we do not have latest edits due to caching of Rules new_range = Range new_start_pos new_start_pos -- we cannot wrap mapM_ inside (mapM_) but we need to wrap (<$) - alpha = all isAlphaNum $ filter (\c -> c /= '_') name + alpha = all isAlphaNum $ filter (/= '_') name result = if alpha then name ++ ", " else "(" ++ name ++ "), " in Just [TextEdit new_range (T.pack result)] diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index ceb89126bd..f40d830dac 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -61,7 +61,7 @@ library , ghc , ghcide >=0.6.0.1 , gitrev - , haskell-lsp ^>=0.22 + , haskell-lsp ^>=0.23 , hls-plugin-api >=0.5 , hslogger , optparse-applicative @@ -283,7 +283,7 @@ executable haskell-language-server , ghcide , hashable , haskell-language-server - , haskell-lsp ^>=0.22 + , haskell-lsp ^>=0.23 , lens , regex-tdfa , hslogger diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index a860049f85..4b05728035 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -37,7 +37,7 @@ library , containers , data-default , Diff - , haskell-lsp ^>=0.22 + , haskell-lsp ^>=0.23 , hashable , hslogger , lens diff --git a/plugins/default/src/Ide/Plugin/Example.hs b/plugins/default/src/Ide/Plugin/Example.hs index 851810dc0b..71d982472a 100644 --- a/plugins/default/src/Ide/Plugin/Example.hs +++ b/plugins/default/src/Ide/Plugin/Example.hs @@ -212,7 +212,7 @@ completion _lf _ide (CompletionParams _doc _pos _mctxt _mt) command xd label = "Example completion" kind = Nothing - tags = List [] + tags = Nothing detail = Nothing documentation = Nothing deprecated = Nothing diff --git a/plugins/default/src/Ide/Plugin/Example2.hs b/plugins/default/src/Ide/Plugin/Example2.hs index 7640ce9abe..0c7f7a684c 100644 --- a/plugins/default/src/Ide/Plugin/Example2.hs +++ b/plugins/default/src/Ide/Plugin/Example2.hs @@ -206,7 +206,7 @@ completion _lf _ide (CompletionParams _doc _pos _mctxt _mt) command xd label = "Example2 completion" kind = Nothing - tags = List [] + tags = Nothing detail = Nothing documentation = Nothing deprecated = Nothing diff --git a/plugins/default/src/Ide/Plugin/Pragmas.hs b/plugins/default/src/Ide/Plugin/Pragmas.hs index 9e3f7d0ca0..040466da44 100644 --- a/plugins/default/src/Ide/Plugin/Pragmas.hs +++ b/plugins/default/src/Ide/Plugin/Pragmas.hs @@ -126,7 +126,7 @@ completion lspFuncs _ide complParams = do CompletionItem { _label = p, _kind = Just CiKeyword, - _tags = List [], + _tags = Nothing, _detail = Nothing, _documentation = Nothing, _deprecated = Nothing, diff --git a/plugins/tactics/hls-tactics-plugin.cabal b/plugins/tactics/hls-tactics-plugin.cabal index aa1256c02c..9f6ab49da4 100644 --- a/plugins/tactics/hls-tactics-plugin.cabal +++ b/plugins/tactics/hls-tactics-plugin.cabal @@ -58,7 +58,7 @@ library , ghc-exactprint , ghc-source-gen , ghcide >=0.1 - , haskell-lsp ^>=0.22 + , haskell-lsp ^>=0.23 , hls-plugin-api , lens , mtl diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 0bea9434e9..7bdf976d63 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -44,8 +44,8 @@ extra-deps: - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 - hashable-1.3.0.0 - - haskell-lsp-0.22.0.0 - - haskell-lsp-types-0.22.0.0 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 - heapsize-0.3.0 - hie-bios-0.7.1 - hlint-3.2.3 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 5d6b9c4cef..89534d4f3d 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -43,8 +43,8 @@ extra-deps: - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 - hashable-1.3.0.0 - - haskell-lsp-0.22.0.0 - - haskell-lsp-types-0.22.0.0 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 - heapsize-0.3.0 - hie-bios-0.7.1 - hlint-3.2.3 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 31febdf7ee..ec04bf0739 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -36,8 +36,8 @@ extra-deps: - ghc-lib-parser-ex-8.10.0.16 - ghc-trace-events-0.1.2.1 - haddock-library-1.8.0 - - haskell-lsp-0.22.0.0 - - haskell-lsp-types-0.22.0.0 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 - haskell-src-exts-1.21.1 - heapsize-0.3.0 - hie-bios-0.7.1 diff --git a/stack.yaml b/stack.yaml index 96394c505e..dbda69dc99 100644 --- a/stack.yaml +++ b/stack.yaml @@ -43,8 +43,8 @@ extra-deps: - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 - hashable-1.3.0.0 - - haskell-lsp-0.22.0.0 - - haskell-lsp-types-0.22.0.0 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 - heapsize-0.3.0 - hie-bios-0.7.1 - hlint-3.2.3 From 5f69ff1fb4583b31364ec0208c5a44c52ce8553d Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Wed, 6 Jan 2021 16:33:54 +0800 Subject: [PATCH 2/2] Update extra-deps --- stack-8.10.1.yaml | 2 ++ stack-8.10.2.yaml | 2 ++ stack-8.10.3.yaml | 2 ++ stack-8.8.3.yaml | 2 ++ stack-8.8.4.yaml | 2 ++ 5 files changed, 10 insertions(+) diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index bdce53c229..53f0f23673 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -43,6 +43,8 @@ extra-deps: - stylish-haskell-0.12.2.0 - semigroups-0.18.5 - temporary-1.2.1.1 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 configure-options: ghcide: diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 90abc17483..c0ffa2394e 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -37,6 +37,8 @@ extra-deps: - stylish-haskell-0.12.2.0 - semigroups-0.18.5 - temporary-1.2.1.1 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 configure-options: ghcide: diff --git a/stack-8.10.3.yaml b/stack-8.10.3.yaml index 8375d928e8..ff032faaa5 100644 --- a/stack-8.10.3.yaml +++ b/stack-8.10.3.yaml @@ -35,6 +35,8 @@ extra-deps: - stylish-haskell-0.12.2.0 - semigroups-0.18.5 - temporary-1.2.1.1 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 configure-options: ghcide: diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 4a0fccce64..ec9251e2bf 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -56,6 +56,8 @@ extra-deps: # commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef - stylish-haskell-0.12.2.0 - temporary-1.2.1.1 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 configure-options: ghcide: diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index 7805eb33e3..560e18b2d4 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -54,6 +54,8 @@ extra-deps: # commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef - stylish-haskell-0.12.2.0 - temporary-1.2.1.1 + - haskell-lsp-0.23.0.0 + - haskell-lsp-types-0.23.0.0 configure-options: ghcide: