mirror of
https://github.com/haskell/ghcide.git
synced 2025-01-06 01:44:13 +03:00
Upgrade to haskell-lsp 0.19 (#254)
* Upgrade to haskell-lsp 0.19 * Clarify version handling
This commit is contained in:
parent
0838dcbbd1
commit
8ea5d69e18
@ -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,
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user