diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 2cd84a82c9..ac2dd4762a 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -41,8 +41,8 @@ library extra, filepath, hashable, - haskell-lsp-types >= 0.18, - haskell-lsp >= 0.18, + haskell-lsp-types == 0.19.*, + haskell-lsp == 0.19.*, mtl, network-uri, prettyprinter-ansi-terminal, diff --git a/ghcide/src/Development/IDE/Core/FileStore.hs b/ghcide/src/Development/IDE/Core/FileStore.hs index 159650e3e4..197a658f4a 100644 --- a/ghcide/src/Development/IDE/Core/FileStore.hs +++ b/ghcide/src/Development/IDE/Core/FileStore.hs @@ -76,7 +76,8 @@ makeVFSHandle = do modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $ case content of Nothing -> Map.delete uri vfs - Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content)) vfs + -- The second version number is only used in persistFileVFS which we do not use so we set it to 0. + Just content -> Map.insert uri (VirtualFile nextVersion 0 (Rope.fromText content)) vfs } makeLSPVFSHandle :: LspFuncs c -> VFSHandle @@ -139,7 +140,7 @@ getModificationTimeRule vfs = alwaysRerun mbVirtual <- liftIO $ getVirtualFile vfs $ filePathToUri' file case mbVirtual of - Just (VirtualFile ver _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver)) + Just (virtualFileVersion -> ver) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver)) Nothing -> liftIO $ fmap wrap (getModTime file') `catch` \(e :: IOException) -> do let err | isDoesNotExistError e = "File does not exist: " ++ file' diff --git a/ghcide/stack-ghc-lib.yaml b/ghcide/stack-ghc-lib.yaml index 1590cf900f..ad00de994c 100644 --- a/ghcide/stack-ghc-lib.yaml +++ b/ghcide/stack-ghc-lib.yaml @@ -2,9 +2,9 @@ resolver: nightly-2019-09-16 packages: - . extra-deps: -- haskell-lsp-0.18.0.0 -- haskell-lsp-types-0.18.0.0 -- lsp-test-0.8.2.0 +- haskell-lsp-0.19.0.0 +- haskell-lsp-types-0.19.0.0 +- lsp-test-0.9.0.0 - hie-bios-0.3.0 - ghc-lib-parser-8.8.1 - ghc-lib-8.8.1 diff --git a/ghcide/stack.yaml b/ghcide/stack.yaml index c9ab14b4c7..5aec32f615 100644 --- a/ghcide/stack.yaml +++ b/ghcide/stack.yaml @@ -2,9 +2,9 @@ resolver: nightly-2019-09-16 packages: - . extra-deps: -- haskell-lsp-0.18.0.0 -- haskell-lsp-types-0.18.0.0 -- lsp-test-0.8.2.0 +- haskell-lsp-0.19.0.0 +- haskell-lsp-types-0.19.0.0 +- lsp-test-0.9.0.0 - hie-bios-0.3.0 nix: packages: [zlib] diff --git a/ghcide/stack84.yaml b/ghcide/stack84.yaml index 629e6e45cf..76aa546289 100644 --- a/ghcide/stack84.yaml +++ b/ghcide/stack84.yaml @@ -3,9 +3,9 @@ packages: - . extra-deps: -- haskell-lsp-0.18.0.0 -- haskell-lsp-types-0.18.0.0 -- lsp-test-0.8.2.0 +- haskell-lsp-0.19.0.0 +- haskell-lsp-types-0.19.0.0 +- lsp-test-0.9.0.0 - rope-utf16-splay-0.3.1.0 - shake-0.18.3 - filepattern-0.1.1 diff --git a/ghcide/stack88.yaml b/ghcide/stack88.yaml index 7a9e8470ad..b677430ae4 100644 --- a/ghcide/stack88.yaml +++ b/ghcide/stack88.yaml @@ -2,6 +2,9 @@ resolver: nightly-2019-12-06 packages: - . extra-deps: +- haskell-lsp-0.19.0.0 +- haskell-lsp-types-0.19.0.0 +- lsp-test-0.9.0.0 - hie-bios-0.3.0 allow-newer: true nix: