Date: Thursday, September 29, 2022 @ 18:42:25
  Author: felixonmars
Revision: 1316716

upgpkg: haskell-language-server 1.4.0.0-49: rebuild with aeson 2.0.3.0, 
aeson-diff 1.1.0.11, aws 0.22.1, bower-json 1.1.0.0, http2 3.0.3, hoauth2 
2.1.0, jose 0.9, microlens-aeson 2.4.0, postgresql-binary 0.12.5, postgrest 
10.0.0, req 3.10.0, swagger2 2.8.1

Added:
  haskell-language-server/trunk/haskell-language-server-aeson-2.patch
Modified:
  haskell-language-server/trunk/PKGBUILD

---------------------------------------+
 PKGBUILD                              |   28 +++--
 haskell-language-server-aeson-2.patch |  155 ++++++++++++++++++++++++++++++++
 2 files changed, 170 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-09-29 18:37:07 UTC (rev 1316715)
+++ PKGBUILD    2022-09-29 18:42:25 UTC (rev 1316716)
@@ -2,7 +2,7 @@
 
 pkgname=haskell-language-server
 pkgver=1.4.0.0
-pkgrel=48
+pkgrel=49
 pkgdesc="LSP server for GHC"
 url="https://github.com/haskell/haskell-language-server#readme";
 license=("Apache")
@@ -10,27 +10,29 @@
 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-async'
          'haskell-base16-bytestring' 'haskell-cryptohash-sha1' 
'haskell-data-default'
          'haskell-extra' 'haskell-ghc' 'haskell-ghc-api-compat' 
'haskell-ghc-paths' 'haskell-gitrev'
-         'haskell-hashable' 'haskell-hie-bios' 'haskell-hiedb'
-         'haskell-hls-call-hierarchy-plugin' 'haskell-hls-eval-plugin'
-         'haskell-hls-explicit-imports-plugin' 'haskell-hls-floskell-plugin'
-         'haskell-hls-fourmolu-plugin' 'haskell-hls-ormolu-plugin' 
'haskell-hls-graph'
-         'haskell-hls-haddock-comments-plugin' 'haskell-hls-hlint-plugin'
+         'haskell-hashable' 'haskell-hie-bios' 'haskell-hiedb' 
'haskell-hls-call-hierarchy-plugin'
+         'haskell-hls-eval-plugin' 'haskell-hls-explicit-imports-plugin'
+         'haskell-hls-floskell-plugin' 'haskell-hls-fourmolu-plugin' 
'haskell-hls-ormolu-plugin'
+         'haskell-hls-graph' 'haskell-hls-haddock-comments-plugin' 
'haskell-hls-hlint-plugin'
          'haskell-hls-module-name-plugin' 'haskell-hls-ormolu-plugin' 
'haskell-hls-plugin-api'
-         'haskell-hls-pragmas-plugin'
-         'haskell-hls-retrie-plugin' 'haskell-hls-stylish-haskell-plugin'
-         'haskell-hslogger' 'haskell-lens' 'haskell-lsp' 
'haskell-optparse-applicative'
-         'haskell-optparse-simple' 'haskell-regex-tdfa' 
'haskell-safe-exceptions'
-         'haskell-sqlite-simple' 'haskell-temporary' 
'haskell-unordered-containers')
+         'haskell-hls-pragmas-plugin' 'haskell-hls-retrie-plugin'
+         'haskell-hls-stylish-haskell-plugin' 'haskell-hslogger' 
'haskell-lens' 'haskell-lens-aeson'
+         'haskell-lsp' 'haskell-optparse-applicative' 
'haskell-optparse-simple' 'haskell-regex-tdfa'
+         'haskell-safe-exceptions' 'haskell-sqlite-simple' 'haskell-temporary'
+         'haskell-unordered-containers')
 # Disabled due to not compatible with GHC 9:
 # 'haskell-hls-brittany-plugin' 'haskell-hls-class-plugin' 
'haskell-hls-splice-plugin' 'haskell-hls-tactics-plugin' 
'haskell-hls-refine-imports-plugin'
 makedepends=('ghc' 'uusi' 'haskell-hls-test-utils' 
'haskell-hspec-expectations' 'haskell-lsp-test'
              'haskell-lsp-types')
 checkdepends=('cabal-install')
-source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz";)
-sha512sums=('2f9222b5b9d748aaa885908e8784acbc5ff5d0ff9142954aced2f53ea97e0ea4eb2d47119d0a03129038d729ea2b9fe05b864577d20bc493e12e0262f5454f99')
+source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz";
+        haskell-language-server-aeson-2.patch)
+sha512sums=('2f9222b5b9d748aaa885908e8784acbc5ff5d0ff9142954aced2f53ea97e0ea4eb2d47119d0a03129038d729ea2b9fe05b864577d20bc493e12e0262f5454f99'
+            
'fa10eba81879d910bd237b1cdf900737b0208dd6dc8291eb3ca76d62e1f771f0a05707e3d65dd67b5fca75d205ebbc3eab3d627b0cddf34de0509c8d4cf3c211')
 
 prepare() {
   cd $pkgname-$pkgver
+  patch -p1 -i ../haskell-language-server-aeson-2.patch
   find test/testdata -name \*.cabal -exec uusi --add-options-all=-dynamic {} \;
   uusi -u ghc-api-compat $pkgname.cabal
 }

Added: haskell-language-server-aeson-2.patch
===================================================================
--- haskell-language-server-aeson-2.patch                               (rev 0)
+++ haskell-language-server-aeson-2.patch       2022-09-29 18:42:25 UTC (rev 
1316716)
@@ -0,0 +1,155 @@
+From 2625689ad4308f5ca207b24fbec2a569ed229347 Mon Sep 17 00:00:00 2001
+From: Javier Neira <[email protected]>
+Date: Wed, 12 Jan 2022 17:24:53 +0100
+Subject: [PATCH] Add support for brittany (needs aeson-2) and floskell with
+ ghc-9.0.1 (#2551)
+
+* Enable tests for brittany and 9.0.2
+
+* Enable tests for floskell plugin
+
+* cabal-ghc901.project: naively enable brittany
+
+* haskell-language-server.cabal: bump brittany flag <(9.0.1->9.2.1)
+
+* Trying to add support for brittany
+
+* Use last hackage floskell version
+
+* Activate floskell in func-test suite
+
+* Restrict brittany in hackage for ghc<9.0.1
+
+* Adapt to Aeson.Key
+
+* Update lsp source repo package
+
+* Refer pr for butcher
+
+* Add missing prefix
+
+* Adapt to aeson-2 (incomplete)
+
+* Use compat module
+
+* Support for aeson-2 and extra-1.7.10
+
+* Remove lsp
+
+* Allow newer aeson for stylish-haskell
+
+* Add needed import for non windows
+
+* Remove insertJson and toJsonKey
+
+* Update cabal-ghc901.project
+
+* Missing import
+
+* Avoid CPP by using lens-aeson
+
+* Update hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs
+
+* Use ghcide compat module
+
+* Use type alias in cpp
+
+* Fix stack build for ghc-8.6.5
+
+* Use lens-aeson key
+
+* Use lens-aeson in func-test
+
+* Fixup shake-bench
+
+* Update docs
+
+* Switch to lens ix
+
+* Try this
+
+Co-authored-by: Anton-Latukha <[email protected]>
+Co-authored-by: Michael Peyton Jones <[email protected]>
+Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
+---
+ .github/workflows/test.yml                    |  2 +-
+ cabal-ghc901.project                          | 15 ++++---
+ ghcide/ghcide.cabal                           |  3 +-
+ ghcide/src/Control/Concurrent/Strict.hs       | 11 +++---
+ ghcide/src/Development/IDE/GHC/Orphans.hs     | 23 ++++++-----
+ haskell-language-server.cabal                 |  5 ++-
+ hls-plugin-api/hls-plugin-api.cabal           |  1 +
+ hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs  | 39 +++++++++----------
+ hls-plugin-api/src/Ide/Plugin/Properties.hs   | 27 ++++++-------
+ hls-plugin-api/src/Ide/Types.hs               |  2 +-
+ .../hls-brittany-plugin.cabal                 |  1 -
+ .../src/Ide/Plugin/Brittany.hs                | 32 ++++++++-------
+ shake-bench/shake-bench.cabal                 |  2 +
+ .../src/Development/Benchmark/Rules.hs        | 31 ++++++++-------
+ stack-8.10.6.yaml                             |  2 +
+ stack-8.10.7.yaml                             |  2 +
+ stack-8.6.5.yaml                              |  5 ++-
+ stack-8.8.4.yaml                              |  3 +-
+ stack-9.0.1.yaml                              | 12 ++++--
+ stack.yaml                                    |  2 +
+ test/functional/FunctionalCodeAction.hs       | 20 +++++-----
+ 21 files changed, 134 insertions(+), 106 deletions(-)
+
+diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal
+index c35e8c0a37..e5898b8d1e 100644
+--- a/haskell-language-server.cabal
++++ b/haskell-language-server.cabal
+@@ -433,6 +433,7 @@ test-suite func-test
+     , data-default
+     , hspec-expectations
+     , lens
++    , lens-aeson
+     , ghcide
+     , hls-test-utils ^>= 1.1.0.0
+     , lsp-types
+diff --git a/test/functional/FunctionalCodeAction.hs 
b/test/functional/FunctionalCodeAction.hs
+index cf368b0613..3d160931b7 100644
+--- a/test/functional/FunctionalCodeAction.hs
++++ b/test/functional/FunctionalCodeAction.hs
+@@ -4,18 +4,18 @@
+ 
+ module FunctionalCodeAction (tests) where
+ 
+-import           Control.Lens                    hiding (List)
++import           Control.Lens            hiding (List)
+ import           Control.Monad
+ import           Data.Aeson
+-import qualified Data.HashMap.Strict             as HM
++import           Data.Aeson.Lens         (_Object)
+ import           Data.List
+-import qualified Data.Map                        as M
++import qualified Data.Map                as M
+ import           Data.Maybe
+-import qualified Data.Text                       as T
++import qualified Data.Text               as T
+ import           Ide.Plugin.Config
+-import           Language.LSP.Test               as Test
+-import qualified Language.LSP.Types.Capabilities as C
+-import qualified Language.LSP.Types.Lens         as L
++import           Language.LSP.Test       as Test
++import qualified Language.LSP.Types.Capabilities as C
++import qualified Language.LSP.Types.Lens as L
+ import           Test.Hls
+ import           Test.Hspec.Expectations
+ 
+@@ -56,11 +56,11 @@ renameTests = testGroup "rename suggestions" [
+ 
+             cars <- getAllCodeActions doc
+             cmd <- liftIO $ inspectCommand cars ["Replace with", "putStrLn"]
+-            let Just (List [Object args]) = cmd ^. L.arguments
+-                Object editParams = args HM.! "fallbackWorkspaceEdit"
++            let Just (List [args]) = cmd ^. L.arguments
++                editParams = args ^. ix "fallbackWorkspaceEdit" . _Object
+             liftIO $ do
+-                "changes" `HM.member` editParams @? "Contains changes"
+-                not ("documentChanges" `HM.member` editParams) @? "Doesn't 
contain documentChanges"
++                (editParams & has (ix "changes"))  @? "Contains changes"
++                not (editParams & has (ix "documentChanges")) @? "Doesn't 
contain documentChanges"
+ 
+             executeCommand cmd
+             _ <- anyRequest

Reply via email to