Update haskell-lsp and bump to 0.8.1.0 0.8.1.0
authorLuke Lau <luke_lau@icloud.com>
Sun, 17 Nov 2019 14:09:17 +0000 (14:09 +0000)
committerLuke Lau <luke_lau@icloud.com>
Sun, 17 Nov 2019 14:09:17 +0000 (14:09 +0000)
Also update tests for hie-bios

ChangeLog.md
lsp-test.cabal
test/Test.hs
test/data/hie.yaml [new file with mode: 0644]

index f01ba4f1be489498bc1fa871af1f44ace48d6325..6cd51b6a2ffb3a9cd733bca370e85f0507d45c51 100644 (file)
@@ -1,5 +1,10 @@
 # Revision history for lsp-test
 
+## 0.8.1.0 -- 2019-11-17
+
+* Update to haskell-lsp-0.18.0.0 (@mpickering, @alanz)
+* Tests now require hie-bios based hie
+
 ## 0.8.0.0 -- 2019-10-18
 
 * Make `Session` a newtype
index 8f0a454d24992db4b8d3910ef5c37f9d76c9a63c..f306aec8ad29edb11332a4e948414aa29f2cada0 100644 (file)
@@ -1,5 +1,5 @@
 name:                lsp-test
-version:             0.8.0.0
+version:             0.8.1.0
 synopsis:            Functional test framework for LSP servers.
 description:
   A test framework for writing tests against
@@ -36,7 +36,7 @@ library
                      , parser-combinators:Control.Applicative.Combinators
   default-language:    Haskell2010
   build-depends:       base >= 4.10 && < 5
-                     , haskell-lsp == 0.17.*
+                     , haskell-lsp == 0.18.*
                      , aeson
                      , aeson-pretty
                      , ansi-terminal
@@ -79,7 +79,7 @@ test-suite tests
   build-depends:       base >= 4.10 && < 5
                      , hspec
                      , lens
-                     , haskell-lsp == 0.17.*
+                     , haskell-lsp == 0.18.*
                      , lsp-test
                      , data-default
                      , aeson
index d689bff411e53a6603c9812f46ba62825ebe87c6..342d889f464d73ce9435c56148bc428c5a7844ae 100644 (file)
@@ -238,7 +238,8 @@ main = hspec $ do
       noDiagnostics
       noDiagnostics
 
-      item:_ <- getCompletions doc (Position 5 5)
+      comps <- getCompletions doc (Position 5 5)
+      let item = head (filter (\x -> x ^. label == "interactWithUser") comps)
       liftIO $ do
         item ^. label `shouldBe` "interactWithUser"
         item ^. kind `shouldBe` Just CiFunction
@@ -273,10 +274,10 @@ main = hspec $ do
   describe "waitForDiagnosticsSource" $
     it "works" $ runSession "hie" fullCaps "test/data" $ do
       openDoc "Error.hs" "haskell"
-      [diag] <- waitForDiagnosticsSource "ghcmod"
+      [diag] <- waitForDiagnosticsSource "bios"
       liftIO $ do
         diag ^. severity `shouldBe` Just DsError
-        diag ^. source `shouldBe` Just "ghcmod"
+        diag ^. source `shouldBe` Just "bios"
 
   describe "rename" $
     it "works" $ runSession "hie" fullCaps "test/data" $ do
diff --git a/test/data/hie.yaml b/test/data/hie.yaml
new file mode 100644 (file)
index 0000000..4b7e849
--- /dev/null
@@ -0,0 +1,3 @@
+cradle:
+    direct:
+        arguments: []