Date: Sunday, February 12, 2023 @ 09:37:55
  Author: felixonmars
Revision: 1399938

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-ghcide/repos/community-staging-x86_64/
  haskell-ghcide/repos/community-staging-x86_64/PKGBUILD
    (from rev 1399937, haskell-ghcide/trunk/PKGBUILD)
  haskell-ghcide/repos/community-staging-x86_64/ghcide-aeson-2.patch
    (from rev 1399937, haskell-ghcide/trunk/ghcide-aeson-2.patch)

----------------------+
 PKGBUILD             |   74 ++++++++++++++++++
 ghcide-aeson-2.patch |  195 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 269 insertions(+)

Copied: haskell-ghcide/repos/community-staging-x86_64/PKGBUILD (from rev 
1399937, haskell-ghcide/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-02-12 09:37:55 UTC (rev 1399938)
@@ -0,0 +1,74 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_hkgname=ghcide
+pkgname=haskell-ghcide
+pkgver=1.8.0.0
+pkgrel=1
+pkgdesc="The core of an IDE"
+url="https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme";
+license=("Apache")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-diff' 'haskell-glob' 'haskell-aeson' 
'haskell-aeson-pretty'
+         'haskell-async' 'haskell-base16-bytestring' 'haskell-case-insensitive'
+         'haskell-co-log-core' 'haskell-cryptohash-sha1' 'haskell-data-default'
+         'haskell-dependent-map' 'haskell-dependent-sum' 'haskell-dlist' 
'haskell-enummapset'
+         'haskell-extra' 'haskell-fingertree' 'haskell-ghc' 
'haskell-ghc-check' 'haskell-ghc-paths'
+         'haskell-ghc-trace-events' 'haskell-gitrev' 'haskell-haddock-library' 
'haskell-hashable'
+         'haskell-heapsize' 'haskell-hie-bios' 'haskell-hie-compat' 
'haskell-hiedb'
+         'haskell-hls-graph' 'haskell-hls-plugin-api' 'haskell-hslogger'
+         'haskell-implicit-hie-cradle' 'haskell-lens' 'haskell-list-t' 
'haskell-lsp'
+         'haskell-lsp-types' 'haskell-monoid-subclasses' 
'haskell-opentelemetry'
+         'haskell-optparse-applicative' 'haskell-parallel' 
'haskell-prettyprinter'
+         'haskell-prettyprinter-ansi-terminal' 'haskell-random' 
'haskell-regex-tdfa'
+         'haskell-safe-exceptions' 'haskell-sorted-list' 
'haskell-sqlite-simple'
+         'haskell-stm-containers' 'haskell-syb' 'haskell-text-rope' 
'haskell-unliftio'
+         'haskell-unliftio-core' 'haskell-unordered-containers' 
'haskell-vector')
+makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-fuzzy' 
'haskell-ghc-typelits-knownnat'
+             'haskell-implicit-hie' 'haskell-lsp-test' 'haskell-network-uri'
+             'haskell-record-dot-preprocessor' 'haskell-record-hasfield' 
'haskell-shake'
+             '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=('cb2b0f528e41e3020c2a2ace566160de98805c1c02aeb345f854181ca5dfd88405b3f22d5fc1bace12174e8cb89ed348ca690c16947630bf9c3270cbb518f33c')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  gen-setup
+  find test/data -name \*.cabal -exec uusi --add-options-all=-dynamic {} \;
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname 
--enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid 
--ghc-option=-fllvm \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie' \
+    -fexecutable
+
+  runhaskell Setup build $MAKEFLAGS
+  runhaskell Setup register --gen-script
+  runhaskell Setup unregister --gen-script
+  sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+  cd $_hkgname-$pkgver
+  cabal update
+  # Random test failures "Received an illegal message between the initialize 
request and response"
+  # th-linking-test-unboxed always fails too
+  PATH="$PWD/dist/build/ghcide:$PWD/dist/build/ghcide-test-preprocessor:$PATH" 
LD_LIBRARY_PATH="$PWD/dist/build" runhaskell Setup test || echo "Tests failed"
+}
+
+package() {
+  cd $_hkgname-$pkgver
+
+  install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+  install -D -m744 unregister.sh 
"$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+  runhaskell Setup copy --destdir="$pkgdir"
+  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}

Copied: haskell-ghcide/repos/community-staging-x86_64/ghcide-aeson-2.patch 
(from rev 1399937, haskell-ghcide/trunk/ghcide-aeson-2.patch)
===================================================================
--- community-staging-x86_64/ghcide-aeson-2.patch                               
(rev 0)
+++ community-staging-x86_64/ghcide-aeson-2.patch       2023-02-12 09:37:55 UTC 
(rev 1399938)
@@ -0,0 +1,195 @@
+From 2625689ad4308f5ca207b24fbec2a569ed229347 Mon Sep 17 00:00:00 2001
+From: Javier Neira <atreyu....@gmail.com>
+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 <anton.latu...@gmail.com>
+Co-authored-by: Michael Peyton Jones <m...@michaelpj.com>
+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)
+ 
+ -- Orphan instances for types from the GHC API.
+ instance Show CoreModule where show = prettyPrint
+@@ -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

Reply via email to