Upgrade to haskell-lsp 0.19 (#254)

* Upgrade to haskell-lsp 0.19

* Clarify version handling
This commit is contained in:
Moritz Kiefer 2019-12-16 14:57:38 +01:00 committed by GitHub
parent 0838dcbbd1
commit 8ea5d69e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 13 deletions

View File

@ -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,

View File

@ -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'

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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: