From 5d34df8cadee30e38a16b579e3593f8f971e7908 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 23 Feb 2024 18:44:28 +0800 Subject: [PATCH 1/4] dhall-lsp-server: Expand version bounds for mtl and transformers These now match the bounds given in dhall.cabal. --- dhall-lsp-server/dhall-lsp-server.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dhall-lsp-server/dhall-lsp-server.cabal b/dhall-lsp-server/dhall-lsp-server.cabal index 4a9fca071..9fc3b09b8 100644 --- a/dhall-lsp-server/dhall-lsp-server.cabal +++ b/dhall-lsp-server/dhall-lsp-server.cabal @@ -57,12 +57,12 @@ library , lens >= 4.16.1 && < 5.3 -- megaparsec follows SemVer: https://github.com/mrkkrp/megaparsec/issues/469#issuecomment-927918469 , megaparsec >= 7.0.2 && < 10 - , mtl >= 2.2.2 && < 2.3 + , mtl >= 2.2.2 && < 2.4 , network-uri >= 2.6.1.0 && < 2.7 , prettyprinter >= 1.7.0 && < 1.8 , text >= 1.2.3.0 && < 2.1 , text-rope >= 0.2 && < 0.3 - , transformers >= 0.5.5.0 && < 0.6 + , transformers >= 0.5.5.0 && < 0.7 , unordered-containers >= 0.2.9.0 && < 0.3 , uri-encode >= 1.5.0.5 && < 1.6 default-language: Haskell2010 From b7925bcb041d01ae8b576dd3a0b277a55e045c3f Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Fri, 23 Feb 2024 18:46:43 +0800 Subject: [PATCH 2/4] dhall-lsp-server: Compatibility with lsp ==2.3.0.0 --- dhall-lsp-server/dhall-lsp-server.cabal | 7 ++++--- dhall-lsp-server/src/Dhall/LSP/Server.hs | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dhall-lsp-server/dhall-lsp-server.cabal b/dhall-lsp-server/dhall-lsp-server.cabal index 9fc3b09b8..04c93b039 100644 --- a/dhall-lsp-server/dhall-lsp-server.cabal +++ b/dhall-lsp-server/dhall-lsp-server.cabal @@ -53,7 +53,8 @@ library , dhall >= 1.38.0 && < 1.43 , dhall-json >= 1.4 && < 1.8 , filepath >= 1.4.2 && < 1.5 - , lsp >= 2.1.0.0 && < 2.2 + , lsp >= 2.3.0.0 && < 2.4 + , lsp-types >= 2.1 && < 2.2 , lens >= 4.16.1 && < 5.3 -- megaparsec follows SemVer: https://github.com/mrkkrp/megaparsec/issues/469#issuecomment-927918469 , megaparsec >= 7.0.2 && < 10 @@ -104,9 +105,9 @@ Test-Suite tests GHC-Options: -Wall Build-Depends: base , - lsp-types >= 2.0.1 && < 2.1 , + lsp-types >= 2.1 && < 2.2 , hspec >= 2.7 && < 2.11 , - lsp-test >= 0.15.0.0 && < 0.16 , + lsp-test >= 0.16.0.0 && < 0.17 , tasty >= 0.11.2 && < 1.5 , tasty-hspec >= 1.1 && < 1.3 , text >= 0.11 && < 2.1 diff --git a/dhall-lsp-server/src/Dhall/LSP/Server.hs b/dhall-lsp-server/src/Dhall/LSP/Server.hs index de0046a00..a48a90ebb 100644 --- a/dhall-lsp-server/src/Dhall/LSP/Server.hs +++ b/dhall-lsp-server/src/Dhall/LSP/Server.hs @@ -52,11 +52,15 @@ run = withLogger $ \ioLogger -> do let defaultConfig = def - let onConfigurationChange _oldConfig json = + let configSection = "dhall" + + let parseConfig _oldConfig json = case fromJSON json of Aeson.Success config -> Right config Aeson.Error string -> Left (Text.pack string) + let onConfigChange _config = return () + let doInitialize environment _request = do return (Right environment) From 2637c7c7a8c0cda858a10de96e4ff65315b53c51 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sat, 24 Feb 2024 14:24:15 +0800 Subject: [PATCH 3/4] nix: haskellPackages overrides for lsp, lsp-types, lsp-test --- nix/packages/lsp-test.nix | 28 ++++++++++++++++++++++++++++ nix/packages/lsp-types.nix | 18 +++++++++++------- nix/packages/lsp.nix | 16 +++++++++------- 3 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 nix/packages/lsp-test.nix diff --git a/nix/packages/lsp-test.nix b/nix/packages/lsp-test.nix new file mode 100644 index 000000000..f2ee1c7c1 --- /dev/null +++ b/nix/packages/lsp-test.nix @@ -0,0 +1,28 @@ +{ mkDerivation, aeson, aeson-pretty, ansi-terminal, async, base +, bytestring, co-log-core, conduit, conduit-parse, containers +, data-default, Diff, directory, exceptions, extra, filepath, Glob +, hspec, lens, lens-aeson, lib, lsp, lsp-types, mtl +, parser-combinators, process, row-types, some, text, time +, transformers, unix, unliftio +}: +mkDerivation { + pname = "lsp-test"; + version = "0.16.0.1"; + sha256 = "607f12a547135848cf6d433a0ef47647ade94d06e812ea1c3a3fb7d3bde9046e"; + libraryHaskellDepends = [ + aeson aeson-pretty ansi-terminal async base bytestring co-log-core + conduit conduit-parse containers data-default Diff directory + exceptions filepath Glob lens lens-aeson lsp lsp-types mtl + parser-combinators process row-types some text time transformers + unix + ]; + testHaskellDepends = [ + aeson base co-log-core containers data-default directory filepath + hspec lens lsp mtl parser-combinators process text unliftio + ]; + testToolDepends = [ lsp ]; + benchmarkHaskellDepends = [ base extra lsp process ]; + homepage = "https://github.com/haskell/lsp/blob/master/lsp-test/README.md"; + description = "Functional test framework for LSP servers"; + license = lib.licenses.bsd3; +} diff --git a/nix/packages/lsp-types.nix b/nix/packages/lsp-types.nix index 9d59d055c..f8d02a9f6 100644 --- a/nix/packages/lsp-types.nix +++ b/nix/packages/lsp-types.nix @@ -1,19 +1,23 @@ { mkDerivation, aeson, base, binary, containers, data-default , deepseq, Diff, directory, dlist, exceptions, file-embed, filepath -, hashable, hspec, hspec-discover, lens, lib, mod, mtl, network-uri -, prettyprinter, QuickCheck, quickcheck-instances, regex, row-types -, safe, some, template-haskell, text, unordered-containers +, generic-arbitrary, hashable, hspec, hspec-discover +, indexed-traversable, indexed-traversable-instances, lens +, lens-aeson, lib, mod, mtl, network-uri, prettyprinter, QuickCheck +, quickcheck-instances, regex, row-types, safe, some +, template-haskell, text }: mkDerivation { pname = "lsp-types"; - version = "2.0.1.0"; - sha256 = "57406c159d14aa30b3d8e5f48ca713186b340f668c93e940e884387fe561ffe0"; + version = "2.1.1.0"; + sha256 = "409b0831a27f0c579f2ef792ae14ae5603c5921f8334826d3b5bb91ec206593f"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson base binary containers data-default deepseq Diff dlist - exceptions file-embed filepath hashable lens mod mtl network-uri - row-types safe some template-haskell text unordered-containers + exceptions file-embed filepath generic-arbitrary hashable + indexed-traversable indexed-traversable-instances lens lens-aeson + mod mtl network-uri prettyprinter QuickCheck quickcheck-instances + row-types safe some template-haskell text ]; executableHaskellDepends = [ base containers directory filepath mtl prettyprinter regex text diff --git a/nix/packages/lsp.nix b/nix/packages/lsp.nix index 84fb67c12..1f7fb81d9 100644 --- a/nix/packages/lsp.nix +++ b/nix/packages/lsp.nix @@ -1,20 +1,22 @@ { mkDerivation, aeson, async, attoparsec, base, bytestring , co-log-core, containers, data-default, directory, exceptions -, filepath, hashable, hspec, hspec-discover, lens, lib, lsp-types -, mtl, prettyprinter, random, row-types, sorted-list, stm -, temporary, text, text-rope, transformers, unliftio-core +, filepath, hashable, hspec, hspec-discover, lens, lens-aeson, lib +, lsp-types, mtl, prettyprinter, random, row-types, sorted-list +, stm, text, text-rope, transformers, unliftio-core , unordered-containers, uuid }: mkDerivation { pname = "lsp"; - version = "2.1.0.0"; - sha256 = "c8a7a2b82d074641c77894639bdd5aacae5046610ee8d6b8a74b0cf71c4af30d"; + version = "2.3.0.0"; + sha256 = "e29866bea5c2482a1ec42a7c948d504685362f1ee1393c4336d7dbed2ae4bb4b"; + revision = "1"; + editedCabalFile = "15jx8x106lnv824yw6mip10gxjbgqww4557xfbyi9nvmgb83h7xj"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson async attoparsec base bytestring co-log-core containers - data-default directory exceptions filepath hashable lens lsp-types - mtl prettyprinter random row-types sorted-list stm temporary text + data-default directory exceptions filepath hashable lens lens-aeson + lsp-types mtl prettyprinter random row-types sorted-list stm text text-rope transformers unliftio-core unordered-containers uuid ]; testHaskellDepends = [ From 3854707018fc2c42f4404ddea348b66d82bd0ed8 Mon Sep 17 00:00:00 2001 From: Gabriella Gonzalez Date: Fri, 1 Mar 2024 22:04:37 -0800 Subject: [PATCH 4/4] Make matching changes to `stack.yaml` --- stack.ghc-9.2.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stack.ghc-9.2.yaml b/stack.ghc-9.2.yaml index 577114f9d..701ac105a 100644 --- a/stack.ghc-9.2.yaml +++ b/stack.ghc-9.2.yaml @@ -18,9 +18,9 @@ extra-deps: - hnix-store-core-0.6.1.0 - hnix-store-remote-0.6.0.0 - logict-0.7.0.3 - - lsp-2.1.0.0 - - lsp-types-2.0.1.0 - - lsp-test-0.15.0.1 + - lsp-2.3.0.0 + - lsp-types-2.1.1.0 + - lsp-test-0.16.0.1 - optparse-applicative-0.16.1.0 - row-types-1.0.1.2@sha256:4d4c7cb95d06a32b28ba977852d52a26b4c1f695ef083a6fd874ab6d79933b64,3071 - saltine-0.2.1.0