From a82d12fbea1ed0df92658d7676f01f5a3920b157 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Mon, 13 Nov 2023 10:38:49 +0000 Subject: [PATCH 1/5] Add 9.8 to CI, remove 8.10 --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 579d55c1..96aa99d0 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - ghc-version: ['9.6', '9.4', '9.2', '9.0', '8.10'] + ghc-version: ['9.8', '9.6', '9.4', '9.2', '9.0'] # Unlikely that we'll succeed on windows and fail on macos, # including it is just burning CI time. But windows could have # path or IO issues, so worth including From e68e48fefdf8923be27db295078af488417f2724 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Mon, 13 Nov 2023 10:41:24 +0000 Subject: [PATCH 2/5] Bump index-state --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index bbfed735..7a63b5e2 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,4 @@ -index-state: 2023-07-09T00:00:00Z +index-state: 2023-11-13T00:00:00Z packages: ./lsp From 5933a70b6023fe1d060456ad679fbc5f903c6ea0 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Mon, 13 Nov 2023 16:04:09 +0530 Subject: [PATCH 3/5] Support aeson 2.2.0 --- cabal.project | 3 +++ lsp-types/lsp-types.cabal | 4 ++-- lsp-types/src/Language/LSP/Protocol/Types/Common.hs | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 7a63b5e2..43114622 100644 --- a/cabal.project +++ b/cabal.project @@ -18,3 +18,6 @@ package lsp-types -- has very many independent modules ghc-options: -j4 +allow-newer: + generic-lens:text, + generic-lens-core:text, diff --git a/lsp-types/lsp-types.cabal b/lsp-types/lsp-types.cabal index e4b69fab..86e5bad7 100644 --- a/lsp-types/lsp-types.cabal +++ b/lsp-types/lsp-types.cabal @@ -69,7 +69,7 @@ library UndecidableInstances build-depends: - , aeson >=1.2.2.0 && <2.2 + , aeson >=1.2.2.0 && <2.3 , base >=4.11 && <5 , binary , containers @@ -87,7 +87,7 @@ library , mtl <2.4 , prettyprinter , network-uri >=2.6 - , row-types + , row-types >=1.0 , safe , some , template-haskell diff --git a/lsp-types/src/Language/LSP/Protocol/Types/Common.hs b/lsp-types/src/Language/LSP/Protocol/Types/Common.hs index a503006f..0931d8ed 100644 --- a/lsp-types/src/Language/LSP/Protocol/Types/Common.hs +++ b/lsp-types/src/Language/LSP/Protocol/Types/Common.hs @@ -183,7 +183,11 @@ instance Semigroup s => Semigroup (s |? Null) where -- in both aeson-1 and aeson-2 -- | Include a value in an JSON object optionally, omitting it if it is 'Nothing'. +#if MIN_VERSION_aeson(2,2,0) +(.=?) :: (J.KeyValue e kv, J.ToJSON v) => String -> Maybe v -> [kv] +#else (.=?) :: (J.KeyValue kv, J.ToJSON v) => String -> Maybe v -> [kv] +#endif k .=? v = case v of Just v' -> [fromString k J..= v'] Nothing -> mempty From 4f1c3908a27a48af10f047387a345f21480ce119 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Mon, 13 Nov 2023 10:44:04 +0000 Subject: [PATCH 4/5] Delete allow-newers until I know what they're for --- cabal.project | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cabal.project b/cabal.project index 43114622..3187c3a5 100644 --- a/cabal.project +++ b/cabal.project @@ -17,7 +17,3 @@ package lsp-types -- This makes a big difference here as lsp-types -- has very many independent modules ghc-options: -j4 - -allow-newer: - generic-lens:text, - generic-lens-core:text, From 560e05f113bf89386b5ae13f8a4eb040276189ba Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Mon, 13 Nov 2023 10:49:07 +0000 Subject: [PATCH 5/5] Add back allow-newers with a comment --- cabal.project | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cabal.project b/cabal.project index 3187c3a5..7d0ad235 100644 --- a/cabal.project +++ b/cabal.project @@ -17,3 +17,9 @@ package lsp-types -- This makes a big difference here as lsp-types -- has very many independent modules ghc-options: -j4 + +if impl(ghc >= 9.7) + -- https://github.com/kcsongor/generic-lens/issues/158 + allow-newer: + generic-lens:text, + generic-lens-core:text,