Date: Thursday, September 29, 2022 @ 18:18:17 Author: felixonmars Revision: 1316674
upgpkg: haskell-ghcide 1.4.2.3-63: 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-ghcide/trunk/ghcide-aeson-2.patch Modified: haskell-ghcide/trunk/PKGBUILD ----------------------+ PKGBUILD | 12 +-- ghcide-aeson-2.patch | 195 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-09-29 17:59:36 UTC (rev 1316673) +++ PKGBUILD 2022-09-29 18:18:17 UTC (rev 1316674) @@ -3,7 +3,7 @@ _hkgname=ghcide pkgname=haskell-ghcide pkgver=1.4.2.3 -pkgrel=62 +pkgrel=63 pkgdesc="The core of an IDE" url="https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme" license=("Apache") @@ -29,19 +29,19 @@ 'haskell-record-hasfield' 'haskell-tasty' 'haskell-tasty-expected-failure' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck' 'haskell-tasty-rerun') checkdepends=('cabal-install') -source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") -sha512sums=('f57bd36ef6df459271f182f68904c9b0f67e70333d9f6bf6bc29cd5cf430265083a2f53087072c420a678872a6844d6f5679b36906067104f158bfa100484fe2') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz" + ghcide-aeson-2.patch) +sha512sums=('f57bd36ef6df459271f182f68904c9b0f67e70333d9f6bf6bc29cd5cf430265083a2f53087072c420a678872a6844d6f5679b36906067104f158bfa100484fe2' + '2520a9709f54c7e4e3adab32fc55074cfe783c89c472fa54c7abcc485c2ae6109187237dfcb8cac2b0d84bd4c58276ad3471d994f0d5aa61e1bb733cd9c73fa4') prepare() { cd $_hkgname-$pkgver + patch -p2 -i ../ghcide-aeson-2.patch gen-setup find test/data -name \*.cabal -exec uusi --add-options-all=-dynamic {} \; uusi -u extra -r ghc:ghc,ghc-api-compat -u hiedb $_hkgname.cabal - # extra 1.7.10 - sed -i "s/hiding (modifyVar, modifyVar_)/hiding (modifyVar, modifyVar_, modifyVar')/" src/Control/Concurrent/Strict.hs - # TODO: Skipped some broken tests for now sed -i '/, benchmarkTests/d;/, findDefinitionAndHoverTests/d;/, bootTests/d;s/, simpleMultiDefTest//;s/echo A.hs/echo -dynamic > $HIE_BIOS_OUTPUT/' test/exe/Main.hs } Added: ghcide-aeson-2.patch =================================================================== --- ghcide-aeson-2.patch (rev 0) +++ ghcide-aeson-2.patch 2022-09-29 18:18:17 UTC (rev 1316674) @@ -0,0 +1,195 @@ +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/ghcide/src/Control/Concurrent/Strict.hs b/ghcide/src/Control/Concurrent/Strict.hs +index 2a33e5284b..842252d51c 100644 +--- a/ghcide/src/Control/Concurrent/Strict.hs ++++ b/ghcide/src/Control/Concurrent/Strict.hs +@@ -4,25 +4,26 @@ module Control.Concurrent.Strict + ,module Control.Concurrent.Extra + ) where + +-import Control.Concurrent.Extra hiding (modifyVar, modifyVar_) ++import Control.Concurrent.Extra hiding (modifyVar, modifyVar', ++ modifyVar_) + import qualified Control.Concurrent.Extra as Extra + import Control.Exception (evaluate) + import Control.Monad (void) + import Data.Tuple.Extra (dupe) + + -- | Strict modification that returns the new value +-modifyVar' :: Var a -> (a -> a) -> IO a ++modifyVar' :: Extra.Var a -> (a -> a) -> IO a + modifyVar' var upd = modifyVarIO' var (pure . upd) + + -- | Strict modification that returns the new value +-modifyVarIO' :: Var a -> (a -> IO a) -> IO a ++modifyVarIO' :: Extra.Var a -> (a -> IO a) -> IO a + modifyVarIO' var upd = do + res <- Extra.modifyVar var $ \v -> do + v' <- upd v + pure $ dupe v' + evaluate res + +-modifyVar :: Var a -> (a -> IO (a, b)) -> IO b ++modifyVar :: Extra.Var a -> (a -> IO (a, b)) -> IO b + modifyVar var upd = do + (new, res) <- Extra.modifyVar var $ \old -> do + (new,res) <- upd old +@@ -30,5 +31,5 @@ modifyVar var upd = do + void $ evaluate new + return res + +-modifyVar_ :: Var a -> (a -> IO a) -> IO () ++modifyVar_ :: Extra.Var a -> (a -> IO a) -> IO () + modifyVar_ var upd = void $ modifyVarIO' var upd +diff --git a/ghcide/src/Development/IDE/GHC/Orphans.hs b/ghcide/src/Development/IDE/GHC/Orphans.hs +index a04fd1e86d..50aaa544ac 100644 +--- a/ghcide/src/Development/IDE/GHC/Orphans.hs ++++ b/ghcide/src/Development/IDE/GHC/Orphans.hs +@@ -36,7 +36,6 @@ import Control.DeepSeq + import Data.Aeson + import Data.Hashable + import Data.String (IsString (fromString)) +-import Data.Text (Text) + import Development.IDE.GHC.Compat + import Development.IDE.GHC.Util + import GHC () +@@ -122,7 +121,7 @@ instance NFData RealSrcSpan where + rnf = rwhnf + + srcSpanFileTag, srcSpanStartLineTag, srcSpanStartColTag, +- srcSpanEndLineTag, srcSpanEndColTag :: Text ++ srcSpanEndLineTag, srcSpanEndColTag :: String + srcSpanFileTag = "srcSpanFile" + srcSpanStartLineTag = "srcSpanStartLine" + srcSpanStartColTag = "srcSpanStartCol" +@@ -132,24 +131,24 @@ srcSpanEndColTag = "srcSpanEndCol" + instance ToJSON RealSrcSpan where + toJSON spn = + object +- [ srcSpanFileTag .= unpackFS (srcSpanFile spn) +- , srcSpanStartLineTag .= srcSpanStartLine spn +- , srcSpanStartColTag .= srcSpanStartCol spn +- , srcSpanEndLineTag .= srcSpanEndLine spn +- , srcSpanEndColTag .= srcSpanEndCol spn ++ [ fromString srcSpanFileTag .= unpackFS (srcSpanFile spn) ++ , fromString srcSpanStartLineTag .= srcSpanStartLine spn ++ , fromString srcSpanStartColTag .= srcSpanStartCol spn ++ , fromString srcSpanEndLineTag .= srcSpanEndLine spn ++ , fromString srcSpanEndColTag .= srcSpanEndCol spn + ] + + instance FromJSON RealSrcSpan where + parseJSON = withObject "object" $ \obj -> do +- file <- fromString <$> (obj .: srcSpanFileTag) ++ file <- fromString <$> (obj .: fromString srcSpanFileTag) + mkRealSrcSpan + <$> (mkRealSrcLoc file +- <$> obj .: srcSpanStartLineTag +- <*> obj .: srcSpanStartColTag ++ <$> obj .: fromString srcSpanStartLineTag ++ <*> obj .: fromString srcSpanStartColTag + ) + <*> (mkRealSrcLoc file +- <$> obj .: srcSpanEndLineTag +- <*> obj .: srcSpanEndColTag ++ <$> obj .: fromString srcSpanEndLineTag ++ <*> obj .: fromString srcSpanEndColTag + ) + + instance NFData Type where
