From 81ed8c28fa8c11f9a1d73a269e46df9d29c32b1b Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sat, 10 Apr 2021 16:04:43 +0800 Subject: [PATCH 1/2] Bump up lower bounds of hls-plugin-api to 1.1 --- haskell-language-server.cabal | 12 +-- hls-plugin-api/hls-plugin-api.cabal | 6 +- hls-test-utils/hls-test-utils.cabal | 2 +- .../hls-class-plugin/hls-class-plugin.cabal | 2 +- .../hls-explicit-imports-plugin.cabal | 59 +++++----- .../hls-haddock-comments-plugin.cabal | 2 +- .../hls-hlint-plugin/hls-hlint-plugin.cabal | 2 +- .../hls-retrie-plugin/hls-retrie-plugin.cabal | 74 +++++++------ .../hls-splice-plugin/hls-splice-plugin.cabal | 2 +- .../hls-stylish-haskell-plugin.cabal | 2 +- .../hls-tactics-plugin.cabal | 102 +++++++++--------- 11 files changed, 136 insertions(+), 129 deletions(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 380870733b..1c35abe2ae 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -65,10 +65,10 @@ library , ghc , ghcide ^>= 1.1.0.0 , gitrev - , lsp + , lsp ^>= 1.2 , hie-bios , hiedb - , hls-plugin-api >= 1.0 && < 1.2 + , hls-plugin-api ^>= 1.1 , hslogger , optparse-applicative , optparse-simple @@ -332,7 +332,7 @@ executable haskell-language-server , mtl , regex-tdfa , safe-exceptions - , shake >=0.17.5 + , shake , sqlite-simple , temporary , transformers @@ -387,11 +387,11 @@ test-suite func-test , hspec-expectations , lens , ghcide - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , lsp-types , aeson - , hls-plugin-api >= 1.0 && < 1.2 - , lsp-test == 0.14.0.0 + , hls-plugin-api + , lsp-test , containers , unordered-containers diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index 5d65d5a7c6..a54321214d 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -5,9 +5,7 @@ synopsis: Haskell Language Server API for plugin communication description: Please see the README on GitHub at -homepage: - https://github.com/haskell/haskell-language-server/hls-plugin-api - +homepage: https://github.com/haskell/haskell-language-server#readme bug-reports: https://github.com/haskell/haskell-language-server/issues license: Apache-2.0 license-file: LICENSE @@ -48,7 +46,7 @@ library , hashable , hslogger , lens - , lsp ^>=1.2.0 + , lsp ^>=1.2 , opentelemetry , process , regex-tdfa >=1.3.1.0 diff --git a/hls-test-utils/hls-test-utils.cabal b/hls-test-utils/hls-test-utils.cabal index e5731977b4..32467f7d34 100644 --- a/hls-test-utils/hls-test-utils.cabal +++ b/hls-test-utils/hls-test-utils.cabal @@ -6,7 +6,7 @@ description: Please see the README on GitHub at homepage: - https://github.com/haskell/haskell-language-server/hls-test-utils + https://github.com/haskell/haskell-language-server#readme bug-reports: https://github.com/haskell/haskell-language-server/issues license: Apache-2.0 diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 9c6db93102..7ae48c4b31 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -30,7 +30,7 @@ library , ghc , ghc-exactprint , ghcide ^>=1.1.0.0 - , hls-plugin-api >=1.0 && <1.2 + , hls-plugin-api ^>=1.1 , lens , lsp , shake diff --git a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal index bc8959a739..7273f2df94 100644 --- a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal +++ b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal @@ -1,33 +1,36 @@ -cabal-version: 2.2 -name: hls-explicit-imports-plugin -version: 1.0.0.0 -synopsis: Explicit imports plugin for Haskell Language Server -license: Apache-2.0 -license-file: LICENSE -author: Pepe Iborra -maintainer: pepeiborra@gmail.com -category: Development -build-type: Simple +cabal-version: 2.2 +name: hls-explicit-imports-plugin +version: 1.0.0.0 +synopsis: Explicit imports plugin for Haskell Language Server +license: Apache-2.0 +license-file: LICENSE +author: Pepe Iborra +maintainer: pepeiborra@gmail.com +category: Development +build-type: Simple extra-source-files: - LICENSE include/ghc-api-version.h + LICENSE library - exposed-modules: Ide.Plugin.ExplicitImports - hs-source-dirs: src - build-depends: aeson - , base >=4.12 && <5 - , containers - , deepseq - , lsp-types - , lsp - , hls-plugin-api >= 1.0 && < 1.2 - , ghc - , ghcide ^>= 1.1.0.0 - , shake - , text - , unordered-containers + exposed-modules: Ide.Plugin.ExplicitImports + hs-source-dirs: src + build-depends: + , aeson + , base >=4.12 && <5 + , containers + , deepseq + , ghc + , ghcide ^>=1.1.0.0 + , hls-plugin-api ^>=1.1 + , lsp + , lsp-types + , shake + , text + , unordered-containers - default-language: Haskell2010 - include-dirs: include - default-extensions: DataKinds, TypeOperators + default-language: Haskell2010 + include-dirs: include + default-extensions: + DataKinds + TypeOperators diff --git a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal index 38ed623ec5..57dadd4604 100644 --- a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal +++ b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal @@ -30,7 +30,7 @@ library , ghc , ghc-exactprint , ghcide ^>=1.1.0.0 - , hls-plugin-api >=1.0 && <1.2 + , hls-plugin-api ^>=1.1 , lsp-types , text , unordered-containers diff --git a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal index 0bed2ebb6f..7be4e4fcf0 100644 --- a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal +++ b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal @@ -44,7 +44,7 @@ library , ghcide ^>=1.1.0.0 , hashable , hlint >=3.2 - , hls-plugin-api >=1.0 && <1.2 + , hls-plugin-api ^>=1.1 , hslogger , lens , lsp diff --git a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal index ae23cb1798..e032b6f140 100644 --- a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal +++ b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal @@ -1,40 +1,44 @@ -cabal-version: 2.2 -name: hls-retrie-plugin -version: 1.0.0.1 -synopsis: Retrie integration plugin for Haskell Language Server -license: Apache-2.0 -license-file: LICENSE -author: Pepe Iborra -maintainer: pepeiborra@gmail.com -category: Development -build-type: Simple +cabal-version: 2.2 +name: hls-retrie-plugin +version: 1.0.0.1 +synopsis: Retrie integration plugin for Haskell Language Server +license: Apache-2.0 +license-file: LICENSE +author: Pepe Iborra +maintainer: pepeiborra@gmail.com +category: Development +build-type: Simple extra-source-files: - LICENSE include/ghc-api-version.h + LICENSE library - exposed-modules: Ide.Plugin.Retrie - hs-source-dirs: src - build-depends: aeson - , base >=4.12 && <5 - , containers - , deepseq - , directory - , extra - , lsp - , lsp-types - , hls-plugin-api >= 1.0 && < 1.2 - , ghc - , ghcide ^>= 1.1 - , hashable - , retrie >=0.1.1.0 - , safe-exceptions - , shake - , text - , transformers - , unordered-containers + exposed-modules: Ide.Plugin.Retrie + hs-source-dirs: src + build-depends: + , aeson + , base >=4.12 && <5 + , containers + , deepseq + , directory + , extra + , ghc + , ghcide ^>=1.1 + , hashable + , hls-plugin-api ^>=1.1 + , lsp + , lsp-types + , retrie >=0.1.1.0 + , safe-exceptions + , shake + , text + , transformers + , unordered-containers + + default-language: Haskell2010 + include-dirs: include + default-extensions: + DataKinds + TypeOperators - default-language: Haskell2010 - include-dirs: include - default-extensions: DataKinds, TypeOperators - ghc-options: -Wno-unticked-promoted-constructors + ghc-options: -Wno-unticked-promoted-constructors diff --git a/plugins/hls-splice-plugin/hls-splice-plugin.cabal b/plugins/hls-splice-plugin/hls-splice-plugin.cabal index 5020d55b0d..d27dd94203 100644 --- a/plugins/hls-splice-plugin/hls-splice-plugin.cabal +++ b/plugins/hls-splice-plugin/hls-splice-plugin.cabal @@ -41,7 +41,7 @@ library , ghc , ghc-exactprint , ghcide ^>=1.1.0.0 - , hls-plugin-api >=1.0 && <1.2 + , hls-plugin-api ^>=1.1 , lens , lsp , retrie diff --git a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal index 0ce04597da..556d49736d 100644 --- a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal +++ b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal @@ -23,7 +23,7 @@ library , ghc , ghc-boot-th , ghcide ^>=1.1.0.0 - , hls-plugin-api >=1.0 && <1.2 + , hls-plugin-api ^>=1.1 , lsp-types , mtl , stylish-haskell ^>=0.12 diff --git a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal index 8f0b11ec45..f501650ef8 100644 --- a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal +++ b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal @@ -15,10 +15,9 @@ build-type: Simple extra-source-files: README.md test/golden/*.cabal - test/golden/*.yaml - test/golden/*.hs test/golden/*.expected - + test/golden/*.hs + test/golden/*.yaml flag pedantic description: Enable -Werror @@ -26,7 +25,7 @@ flag pedantic manual: True library - hs-source-dirs: src + hs-source-dirs: src exposed-modules: Ide.Plugin.Tactic Wingman.Auto @@ -52,14 +51,17 @@ library Wingman.Types ghc-options: - -Wall -Wno-name-shadowing -Wredundant-constraints -Wno-unticked-promoted-constructors + -Wall -Wno-name-shadowing -Wredundant-constraints + -Wno-unticked-promoted-constructors + if flag(pedantic) ghc-options: -Werror build-depends: , aeson - , base >=4.12 && <5 + , base >=4.12 && <5 , containers + , deepseq , directory , extra , filepath @@ -69,85 +71,85 @@ library , ghc-boot-th , ghc-exactprint , ghc-source-gen - , ghcide ^>= 1.1.0.0 - , lsp - , hls-plugin-api >= 1.0 && < 1.2 + , ghcide ^>=1.1.0.0 + , hls-plugin-api ^>=1.1 , lens + , lsp , mtl - , refinery ^>=0.3 - , retrie >=0.1.1.0 - , shake >=0.17.5 + , refinery ^>=0.3 + , retrie >=0.1.1.0 + , shake , syb , text , transformers - , deepseq , unordered-containers - default-language: Haskell2010 + default-language: Haskell2010 default-extensions: - DataKinds, - DeriveAnyClass, - DeriveFunctor, - DeriveGeneric, - DeriveDataTypeable, - DeriveFoldable, - DeriveTraversable, - DerivingStrategies, - DerivingVia, - FlexibleContexts, - FlexibleInstances, - GADTs, - GeneralizedNewtypeDeriving, - LambdaCase, - MultiParamTypeClasses, - NumDecimals, - OverloadedLabels, - PatternSynonyms, - ScopedTypeVariables, - TypeApplications, - TypeOperators, + DataKinds + DeriveAnyClass + DeriveDataTypeable + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveTraversable + DerivingStrategies + DerivingVia + FlexibleContexts + FlexibleInstances + GADTs + GeneralizedNewtypeDeriving + LambdaCase + MultiParamTypeClasses + NumDecimals + OverloadedLabels + PatternSynonyms + ScopedTypeVariables + TypeApplications + TypeOperators ViewPatterns test-suite tests - type: exitcode-stdio-1.0 - main-is: Main.hs + type: exitcode-stdio-1.0 + main-is: Main.hs other-modules: AutoTupleSpec CodeAction.AutoSpec CodeAction.DestructAllSpec - CodeAction.RefineSpec CodeAction.DestructSpec CodeAction.IntrosSpec + CodeAction.RefineSpec CodeAction.UseDataConSpec ProviderSpec Spec UnificationSpec Utils - hs-source-dirs: - test - ghc-options: -Wall -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N + + hs-source-dirs: test + ghc-options: + -Wall -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N + build-depends: - QuickCheck , aeson , base , containers + , deepseq , directory , filepath , ghc - , ghcide >= 0.7.5.0 + , ghcide , hls-plugin-api , hls-tactics-plugin , hls-test-utils - , lsp-types , hspec , hspec-expectations , lens + , lsp-types , mtl - , text - , deepseq - , tasty-hunit + , QuickCheck , tasty-hspec - build-tool-depends: - hspec-discover:hspec-discover - default-language: Haskell2010 + , tasty-hunit + , text + build-tool-depends: hspec-discover:hspec-discover -any + default-language: Haskell2010 From cd65e535036d311e45b06843afdc312e108feaef Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sat, 10 Apr 2021 16:06:38 +0800 Subject: [PATCH 2/2] Add bounds for hls-test-utils --- haskell-language-server.cabal | 2 +- plugins/hls-brittany-plugin/hls-brittany-plugin.cabal | 2 +- plugins/hls-class-plugin/hls-class-plugin.cabal | 2 +- plugins/hls-eval-plugin/hls-eval-plugin.cabal | 2 +- .../hls-haddock-comments-plugin.cabal | 2 +- plugins/hls-splice-plugin/hls-splice-plugin.cabal | 2 +- .../hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal | 2 +- plugins/hls-tactics-plugin/hls-tactics-plugin.cabal | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 1c35abe2ae..872997da48 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -65,7 +65,7 @@ library , ghc , ghcide ^>= 1.1.0.0 , gitrev - , lsp ^>= 1.2 + , lsp , hie-bios , hiedb , hls-plugin-api ^>= 1.1 diff --git a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal index 67d501efc5..cded7456ce 100644 --- a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal +++ b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal @@ -44,5 +44,5 @@ test-suite tests , base , bytestring , hls-brittany-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , text diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 7ae48c4b31..5db5adbb83 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -56,7 +56,7 @@ test-suite tests , bytestring , filepath , hls-class-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , lens , lsp-test , lsp-types diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index b77747fac1..d3a19bee4f 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -105,7 +105,7 @@ test-suite tests , extra , filepath , hls-eval-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , lens , lsp-test , lsp-types diff --git a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal index 57dadd4604..a9e66f15a2 100644 --- a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal +++ b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal @@ -51,5 +51,5 @@ test-suite tests , bytestring , filepath , hls-haddock-comments-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , text diff --git a/plugins/hls-splice-plugin/hls-splice-plugin.cabal b/plugins/hls-splice-plugin/hls-splice-plugin.cabal index d27dd94203..e2d584a5dc 100644 --- a/plugins/hls-splice-plugin/hls-splice-plugin.cabal +++ b/plugins/hls-splice-plugin/hls-splice-plugin.cabal @@ -69,5 +69,5 @@ test-suite tests , extra , filepath , hls-splice-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , text diff --git a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal index 556d49736d..b7cdb36536 100644 --- a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal +++ b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal @@ -41,5 +41,5 @@ test-suite tests , base , bytestring , hls-stylish-haskell-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , text diff --git a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal index f501650ef8..965a45ef56 100644 --- a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal +++ b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal @@ -140,7 +140,7 @@ test-suite tests , ghcide , hls-plugin-api , hls-tactics-plugin - , hls-test-utils + , hls-test-utils ^>= 1.0.0.0 , hspec , hspec-expectations , lens