Date: Friday, November 11, 2022 @ 14:36:11
Author: felixonmars
Revision: 1346736
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 1346735, haskell-ghcide/trunk/PKGBUILD)
haskell-ghcide/repos/community-staging-x86_64/ghcide-aeson-2.patch
(from rev 1346735, haskell-ghcide/trunk/ghcide-aeson-2.patch)
----------------------+
PKGBUILD | 82 ++++++++++++++++++++
ghcide-aeson-2.patch | 195 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 277 insertions(+)
Copied: haskell-ghcide/repos/community-staging-x86_64/PKGBUILD (from rev
1346735, haskell-ghcide/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-11-11 14:36:11 UTC (rev 1346736)
@@ -0,0 +1,82 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=ghcide
+pkgname=haskell-ghcide
+pkgver=1.5.0.1
+pkgrel=11
+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-bytestring-encoding'
+ 'haskell-case-insensitive' 'haskell-cryptohash-sha1'
'haskell-data-default'
+ 'haskell-dependent-map' 'haskell-dependent-sum' 'haskell-dlist'
'haskell-extra'
+ 'haskell-fingertree' 'haskell-fuzzy' 'haskell-ghc'
'haskell-ghc-api-compat'
+ 'haskell-ghc-check' 'haskell-ghc-exactprint' '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-lsp' 'haskell-lsp-test' 'haskell-lsp-types'
'haskell-monoid-subclasses'
+ 'haskell-network-uri' 'haskell-opentelemetry'
'haskell-optparse-applicative'
+ 'haskell-parallel' 'haskell-prettyprinter'
'haskell-prettyprinter-ansi-terminal'
+ 'haskell-regex-tdfa' 'haskell-retrie' 'haskell-rope-utf16-splay'
'haskell-safe'
+ 'haskell-safe-exceptions' 'haskell-shake' 'haskell-sorted-list'
'haskell-sqlite-simple'
+ 'haskell-syb' 'haskell-tasty-hunit' 'haskell-unliftio'
'haskell-unliftio-core'
+ 'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-vector'
+ 'haskell-vector-algorithms')
+makedepends=('ghc' 'uusi' 'haskell-quickcheck' 'haskell-ghc-typelits-knownnat'
+ 'haskell-implicit-hie' 'haskell-quickcheck-instances'
'haskell-record-dot-preprocessor'
+ 'haskell-record-hasfield' 'haskell-tasty'
'haskell-tasty-expected-failure'
+ 'haskell-tasty-quickcheck' 'haskell-tasty-rerun')
+checkdepends=('cabal-install')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+ ghcide-aeson-2.patch)
+sha512sums=('d010782dbabd2a35413f9856116c3b2cb0bd83af97b0bf47ff9cb0850948cf919e3614fa3d40ef3750bf0bafac719fdb81f879a7edee16072122941dfac89161'
+
'78c9601d0ea31ec73f6d1bb08dcbfd1d09d47649eaa07b3ec8808723bb727cf65ad5ac6ae1e709c84448a58a1061840e34b5c2e9e6a88dff3d584f070a8b4b1e')
+
+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
+
+ # 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
+}
+
+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'
+
+ 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 1346735, 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 2022-11-11 14:36:11 UTC
(rev 1346736)
@@ -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)
+
+ -- 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