Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp-server: Compatibility with lsp ==2.3.0.0 #2571

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions dhall-lsp-server/dhall-lsp-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ 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
, 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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion dhall-lsp-server/src/Dhall/LSP/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
28 changes: 28 additions & 0 deletions nix/packages/lsp-test.nix
Original file line number Diff line number Diff line change
@@ -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;
}
18 changes: 11 additions & 7 deletions nix/packages/lsp-types.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 9 additions & 7 deletions nix/packages/lsp.nix
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
6 changes: 3 additions & 3 deletions stack.ghc-9.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading