diff --git a/ghcide.cabal b/ghcide.cabal index 2cd84a82c..ac2dd4762 100644 --- a/ghcide.cabal +++ b/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/src/Development/IDE/Core/FileStore.hs b/src/Development/IDE/Core/FileStore.hs index 159650e3e..197a658f4 100644 --- a/src/Development/IDE/Core/FileStore.hs +++ b/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/stack-ghc-lib.yaml b/stack-ghc-lib.yaml index 1590cf900..ad00de994 100644 --- a/stack-ghc-lib.yaml +++ b/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/stack.yaml b/stack.yaml index c9ab14b4c..5aec32f61 100644 --- a/stack.yaml +++ b/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/stack84.yaml b/stack84.yaml index 629e6e45c..76aa54628 100644 --- a/stack84.yaml +++ b/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/stack88.yaml b/stack88.yaml index 7a9e8470a..b677430ae 100644 --- a/stack88.yaml +++ b/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: