on master help sign in
Upgrade to haskell-lsp-0.20 (#405)
commite59d3e2c778b07fde3a916046cfa2662ea6107ad authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateWed 5 Feb 2020, 10:14 (7 years ago) parent368cff7
7 files changed+20−16
ghcide.cabal+2−2 src/Development/IDE/Core/Shake.hs+4−4 src/Development/IDE/Types/Location.hs+2−1 stack-ghc-lib.yaml+3−3 stack.yaml+3−3 stack84.yaml+3−3 stack88.yaml+3
ghcide.cabal+2−2
@@ -43,8 +43,8 @@ library
4343 filepath,
4444 haddock-library >= 1.8,
4545 hashable,
46− haskell-lsp-types == 0.19.*,
47− haskell-lsp == 0.19.*,
46+ haskell-lsp-types == 0.20.*,
47+ haskell-lsp == 0.20.*,
4848 mtl,
4949 network-uri,
5050 prettyprinter-ansi-terminal,
src/Development/IDE/Core/Shake.hs+4−4
@@ -414,7 +414,7 @@ shakeRun IdeState{shakeExtras=ShakeExtras{..}, ..} acts =
414414 profile = case res of
415415 Right (_, Just fp) ->
416416 let link = case filePathToUri' $ toNormalizedFilePath fp of
417− NormalizedUri x -> x
417+ NormalizedUri _ x -> x
418418 in ", profile saved at " <> T.unpack link
419419 _ -> ""
420420 let logMsg = logDebug logger $ T.pack $
@@ -800,7 +800,7 @@ getAllDiagnostics ::
800800 DiagnosticStore ->
801801 [FileDiagnostic]
802802getAllDiagnostics =
803− concatMap (\(k,v) -> map (fromUri k,ShowDiag,) $ getDiagnosticsFromStore v) . Map.toList
803+ concatMap (\(k,v) -> map (fromUri k,ShowDiag,) $ getDiagnosticsFromStore v) . HMap.toList
804804
805805getFileDiagnostics ::
806806 NormalizedFilePath ->
@@ -808,14 +808,14 @@ getFileDiagnostics ::
808808 [LSP.Diagnostic]
809809getFileDiagnostics fp ds =
810810 maybe [] getDiagnosticsFromStore $
811− Map.lookup (filePathToUri' fp) ds
811+ HMap.lookup (filePathToUri' fp) ds
812812
813813filterDiagnostics ::
814814 (NormalizedFilePath -> Bool) ->
815815 DiagnosticStore ->
816816 DiagnosticStore
817817filterDiagnostics keep =
818− Map.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
818+ HMap.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
819819
820820filterVersionMap
821821 :: Map NormalizedUri (Set.Set TextDocumentVersion)
src/Development/IDE/Types/Location.hs+2−1
@@ -122,7 +122,8 @@ filePathToUriInternal' fp = toNormalizedUri $ Uri $ T.pack $ LSP.fileScheme <> "
122122
123123 toNormalizedUri :: Uri -> NormalizedUri
124124 toNormalizedUri (Uri t) =
125− NormalizedUri $ T.pack $ escapeURIString isUnescapedInURI $ unEscapeString $ T.unpack t
125+ let fp = T.pack $ escapeURIString isUnescapedInURI $ unEscapeString $ T.unpack t
126+ in NormalizedUri (hash fp) fp
126127
127128 platformAdjustToUriPath :: FilePath -> String
128129 platformAdjustToUriPath srcPath
stack-ghc-lib.yaml+3−3
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-16
22packages:
33- .
44extra-deps:
5−- haskell-lsp-0.19.0.0
6−- haskell-lsp-types-0.19.0.0
7−- lsp-test-0.10.0.0
5+- haskell-lsp-0.20.0.0
6+- haskell-lsp-types-0.20.0.0
7+- lsp-test-0.10.1.0
88- hie-bios-0.4.0
99- ghc-lib-parser-8.8.1
1010- ghc-lib-8.8.1
stack.yaml+3−3
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-21
22packages:
33- .
44extra-deps:
5−- haskell-lsp-0.19.0.0
6−- haskell-lsp-types-0.19.0.0
7−- lsp-test-0.10.0.0
5+- haskell-lsp-0.20.0.0
6+- haskell-lsp-types-0.20.0.0
7+- lsp-test-0.10.1.0
88- hie-bios-0.4.0
99- fuzzy-0.1.0.0
1010- regex-pcre-builtin-0.95.1.1.8.43
stack84.yaml+3−3
@@ -5,9 +5,9 @@ packages:
55extra-deps:
66- aeson-1.4.6.0
77- base-orphans-0.8.2
8−- haskell-lsp-0.19.0.0
9−- haskell-lsp-types-0.19.0.0
10−- lsp-test-0.10.0.0
8+- haskell-lsp-0.20.0.0
9+- haskell-lsp-types-0.20.0.0
10+- lsp-test-0.10.1.0
1111- rope-utf16-splay-0.3.1.0
1212- filepattern-0.1.1
1313- js-dgtable-0.5.2
stack88.yaml+3
@@ -3,5 +3,8 @@ packages:
33- .
44extra-deps:
55- fuzzy-0.1.0.0
6+- haskell-lsp-0.20.0.0
7+- haskell-lsp-types-0.20.0.0
8+- lsp-test-0.10.1.0
69nix:
710 packages: [zlib]