From 8dda3132c7363d74777f86f07b0b19d5a08a1479 Mon Sep 17 00:00:00 2001 From: wz1000 Date: Tue, 14 Nov 2023 01:59:59 -0800 Subject: [PATCH] Remove head.hackage (#3867) * Remove head.hackage Bump to - lsp-2.3 - lsp-types-2.1 - hiedb-0.4.4 - hie-bios-12.1 (TODO remove source-repository package in favour of hackage release) - hie-comat-0.3.1.2 * Bump cabal version for CI * Add comments for allow-newer * Fix build on 9.6 * Hopefully fix stack extra-deps --------- Co-authored-by: Michael Peyton Jones --- .github/actions/setup-build/action.yml | 2 +- cabal.project | 42 ++++++++----------- ghcide/ghcide.cabal | 8 ++-- ghcide/src/Development/IDE/Core/Shake.hs | 2 +- haskell-language-server.cabal | 2 +- hie-compat/hie-compat.cabal | 4 +- hls-plugin-api/hls-plugin-api.cabal | 2 +- hls-plugin-api/src/Ide/Plugin/RangeMap.hs | 3 +- hls-test-utils/hls-test-utils.cabal | 4 +- .../hls-alternate-number-format-plugin.cabal | 2 +- .../hls-cabal-plugin/hls-cabal-plugin.cabal | 4 +- .../hls-call-hierarchy-plugin.cabal | 2 +- .../hls-explicit-fixity-plugin.cabal | 2 +- .../hls-floskell-plugin.cabal | 2 +- plugins/hls-gadt-plugin/hls-gadt-plugin.cabal | 2 +- stack-lts21.yaml | 9 ++-- stack.yaml | 9 ++-- 17 files changed, 48 insertions(+), 53 deletions(-) diff --git a/.github/actions/setup-build/action.yml b/.github/actions/setup-build/action.yml index f126941a901..e4480db5cc8 100644 --- a/.github/actions/setup-build/action.yml +++ b/.github/actions/setup-build/action.yml @@ -7,7 +7,7 @@ inputs: cabal: description: "Cabal version" required: false - default: "3.8.1.0" + default: "3.10.2.0" os: description: "Operating system: Linux, Windows or macOS" required: true diff --git a/cabal.project b/cabal.project index 75dbc2656b5..9c4a520b935 100644 --- a/cabal.project +++ b/cabal.project @@ -34,7 +34,7 @@ packages: ./plugins/hls-refactor-plugin ./plugins/hls-overloaded-record-dot-plugin -index-state: 2023-10-06T06:12:29Z +index-state: 2023-11-13T12:07:58Z tests: True test-show-details: direct @@ -84,27 +84,19 @@ if impl(ghc >= 9.1) if impl(ghc >= 9.7) allow-newer: - base, - template-haskell, - ghc, - ghc-prim, - integer-gmp, - ghc-bignum, - template-haskell, - text, - binary, - bytestring, - Cabal, - unix, - deepseq, - - repository head.hackage.ghc.haskell.org - url: https://ghc.gitlab.haskell.org/head.hackage/ - secure: True - key-threshold: 3 - root-keys: - f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 - 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 - 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - - active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org + ekg-core:text, + -- https://github.com/maoe/ghc-trace-events/issues/12 + ghc-trace-events:base, + ghc-trace-events:bytestring, + ghc-trace-events:text, + -- https://github.com/haskell-primitive/primitive-unlifted/issues/39 + primitive-unlifted:bytestring, + -- https://github.com/obsidiansystems/constraints-extras/issues/54 + constraints-extras:base, + constraints-extras:template-haskell, + -- https://github.com/obsidiansystems/commutative-semigroups/issues/13 + commutative-semigroups:base, + commutative-semigroups:template-haskell, + -- https://github.com/kcsongor/generic-lens/issues/158 + generic-lens:text, + generic-lens-core:text, diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index c4faae618ad..7f8c8508842 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -72,9 +72,9 @@ library hls-plugin-api == 2.4.0.0, lens, list-t, - hiedb == 0.4.3.*, - lsp-types ^>= 2.0.2.0, - lsp ^>= 2.2.0.0 , + hiedb == 0.4.4.*, + lsp-types ^>= 2.1.0.0, + lsp ^>= 2.3.0.0 , mtl, optparse-applicative, parallel, @@ -107,7 +107,7 @@ library ghc-check >=0.5.0.8, ghc-paths, cryptohash-sha1 >=0.11.100 && <0.12, - hie-bios == 0.12.0, + hie-bios == 0.12.1, -- implicit-hie 0.1.3.0 introduced an unexpected behavioral change. -- https://github.com/Avi-D-coder/implicit-hie/issues/50 -- to make sure ghcide behaves in a desirable way, we put implicit-hie diff --git a/ghcide/src/Development/IDE/Core/Shake.hs b/ghcide/src/Development/IDE/Core/Shake.hs index 82aeb73811c..80837a66687 100644 --- a/ghcide/src/Development/IDE/Core/Shake.hs +++ b/ghcide/src/Development/IDE/Core/Shake.hs @@ -366,7 +366,7 @@ getVirtualFile nf = do -- Take a snapshot of the current LSP VFS vfsSnapshot :: Maybe (LSP.LanguageContextEnv a) -> IO VFS -vfsSnapshot Nothing = pure $ VFS mempty "" +vfsSnapshot Nothing = pure $ VFS mempty vfsSnapshot (Just lspEnv) = LSP.runLspT lspEnv LSP.getVirtualFiles diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 715950a049c..5616acefcf1 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -374,7 +374,7 @@ library , ghc , ghcide == 2.4.0.0 , githash >=0.1.6.1 - , lsp >= 2.2.0.0 + , lsp >= 2.3.0.0 , hie-bios , hiedb , hls-plugin-api == 2.4.0.0 diff --git a/hie-compat/hie-compat.cabal b/hie-compat/hie-compat.cabal index 788e2dccb75..2b9e78d3236 100644 --- a/hie-compat/hie-compat.cabal +++ b/hie-compat/hie-compat.cabal @@ -1,6 +1,6 @@ cabal-version: 1.22 name: hie-compat -version: 0.3.1.1 +version: 0.3.1.2 synopsis: HIE files for GHC 8.8 and other HIE file backports license: Apache-2.0 description: @@ -24,7 +24,7 @@ source-repository head library default-language: Haskell2010 build-depends: - base < 4.19, array, bytestring, containers, directory, filepath, transformers + base < 4.20, array, bytestring, containers, directory, filepath, transformers build-depends: ghc >= 8.10, ghc-boot ghc-options: -Wall -Wno-name-shadowing diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index f4d0185df27..2c3d0286319 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -62,7 +62,7 @@ library , hls-graph == 2.4.0.0 , lens , lens-aeson - , lsp ^>=2.2 + , lsp ^>=2.3 , mtl , opentelemetry >=0.4 , optparse-applicative diff --git a/hls-plugin-api/src/Ide/Plugin/RangeMap.hs b/hls-plugin-api/src/Ide/Plugin/RangeMap.hs index 97b5614d42c..11d7ebe29ee 100644 --- a/hls-plugin-api/src/Ide/Plugin/RangeMap.hs +++ b/hls-plugin-api/src/Ide/Plugin/RangeMap.hs @@ -23,7 +23,8 @@ import Data.Bifunctor (first) import Data.Foldable (foldl') import Development.IDE.Graph.Classes (NFData) import Language.LSP.Protocol.Types (Position, - Range (Range)) + Range (Range), + isSubrangeOf) #ifdef USE_FINGERTREE import qualified HaskellWorks.Data.IntervalMap.FingerTree as IM #endif diff --git a/hls-test-utils/hls-test-utils.cabal b/hls-test-utils/hls-test-utils.cabal index 3eb1149db0b..8e822d380a9 100644 --- a/hls-test-utils/hls-test-utils.cabal +++ b/hls-test-utils/hls-test-utils.cabal @@ -46,9 +46,9 @@ library , hls-graph , hls-plugin-api == 2.4.0.0 , lens - , lsp ^>=2.2 + , lsp ^>=2.3 , lsp-test ^>=0.16 - , lsp-types ^>=2.0.2 + , lsp-types ^>=2.1 , tasty , tasty-expected-failure , tasty-golden diff --git a/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal b/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal index c89681b2fd7..beca02f17dc 100644 --- a/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal +++ b/plugins/hls-alternate-number-format-plugin/hls-alternate-number-format-plugin.cabal @@ -37,7 +37,7 @@ library , hls-plugin-api == 2.4.0.0 , hie-compat , lens - , lsp ^>=2.2.0.0 + , lsp ^>=2.3.0.0 , mtl , regex-tdfa , syb diff --git a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal index 21a6da5a7fa..a59001eb354 100644 --- a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal +++ b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal @@ -54,8 +54,8 @@ library , hls-plugin-api == 2.4.0.0 , hls-graph == 2.4.0.0 , lens - , lsp ^>=2.2 - , lsp-types ^>=2.0.2 + , lsp ^>=2.3 + , lsp-types ^>=2.1 , regex-tdfa ^>=1.3.1 , stm , text diff --git a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal index e599b367c22..90990ca538d 100644 --- a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal +++ b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal @@ -37,7 +37,7 @@ library , hiedb , hls-plugin-api == 2.4.0.0 , lens - , lsp >=2.2.0.0 + , lsp >=2.3 , sqlite-simple , text , unordered-containers diff --git a/plugins/hls-explicit-fixity-plugin/hls-explicit-fixity-plugin.cabal b/plugins/hls-explicit-fixity-plugin/hls-explicit-fixity-plugin.cabal index 721dee0c0d9..24fb5f18065 100644 --- a/plugins/hls-explicit-fixity-plugin/hls-explicit-fixity-plugin.cabal +++ b/plugins/hls-explicit-fixity-plugin/hls-explicit-fixity-plugin.cabal @@ -32,7 +32,7 @@ library , ghcide == 2.4.0.0 , hashable , hls-plugin-api == 2.4.0.0 - , lsp >=2.2 + , lsp >=2.3 , text , transformers diff --git a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal index 5beb8d7a0fe..3c0a6b0cfba 100644 --- a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal +++ b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal @@ -31,7 +31,7 @@ library , floskell ^>=0.10 , ghcide == 2.4.0.0 , hls-plugin-api == 2.4.0.0 - , lsp-types ^>=2.0.2.0 + , lsp-types ^>=2.1 , mtl , text , transformers diff --git a/plugins/hls-gadt-plugin/hls-gadt-plugin.cabal b/plugins/hls-gadt-plugin/hls-gadt-plugin.cabal index 8616b361b90..d1251c2fdde 100644 --- a/plugins/hls-gadt-plugin/hls-gadt-plugin.cabal +++ b/plugins/hls-gadt-plugin/hls-gadt-plugin.cabal @@ -41,7 +41,7 @@ library , hls-plugin-api == 2.4.0.0 , hls-refactor-plugin , lens - , lsp >=2.2.0.0 + , lsp >=2.3 , mtl , text , transformers diff --git a/stack-lts21.yaml b/stack-lts21.yaml index 5f26370a2ab..5ac22459338 100644 --- a/stack-lts21.yaml +++ b/stack-lts21.yaml @@ -43,16 +43,17 @@ allow-newer: true extra-deps: - floskell-0.10.7 -- hiedb-0.4.3.0 +- hiedb-0.4.4.0 +- hie-bios-0.12.1 - implicit-hie-0.1.2.7 - implicit-hie-cradle-0.5.0.1 - monad-dijkstra-0.1.1.3 - algebraic-graphs-0.6.1 - retrie-1.2.2 - stylish-haskell-0.14.4.0 -- lsp-2.2.0.0 -- lsp-test-0.16.0.0 -- lsp-types-2.0.2.0 +- lsp-2.3.0.0 +- lsp-test-0.16.0.1 +- lsp-types-2.1.0.0 configure-options: diff --git a/stack.yaml b/stack.yaml index bba26fd4b61..3d86da455a8 100644 --- a/stack.yaml +++ b/stack.yaml @@ -43,7 +43,8 @@ allow-newer: true extra-deps: - Cabal-syntax-3.10.1.0@sha256:bb835ebab577fd0f9c11dab96210dbb8d68ffc62652576f4b092563c345930e7,7434 # - floskell-0.10.7 -- hiedb-0.4.3.0 +- hiedb-0.4.4.0 +- hie-bios-0.12.1 - implicit-hie-0.1.2.7 - implicit-hie-cradle-0.5.0.1 - algebraic-graphs-0.6.1 @@ -51,9 +52,9 @@ extra-deps: - hw-fingertree-0.1.2.1 - hw-prim-0.6.3.2 - ansi-terminal-0.11.5 -- lsp-2.2.0.0 -- lsp-test-0.16.0.0 -- lsp-types-2.0.2.0 +- lsp-2.3.0.0 +- lsp-test-0.16.0.1 +- lsp-types-2.1.0.0 configure-options: