Skip to content

Commit e59d3e2

Browse files
authored
Upgrade to haskell-lsp-0.20 (#405)
1 parent 368cff7 commit e59d3e2

File tree

7 files changed

+20
-16
lines changed

7 files changed

+20
-16
lines changed

ghcide.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -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
Original file line numberDiff line numberDiff line change
@@ -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,22 +800,22 @@ getAllDiagnostics ::
800800
DiagnosticStore ->
801801
[FileDiagnostic]
802802
getAllDiagnostics =
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

805805
getFileDiagnostics ::
806806
NormalizedFilePath ->
807807
DiagnosticStore ->
808808
[LSP.Diagnostic]
809809
getFileDiagnostics fp ds =
810810
maybe [] getDiagnosticsFromStore $
811-
Map.lookup (filePathToUri' fp) ds
811+
HMap.lookup (filePathToUri' fp) ds
812812

813813
filterDiagnostics ::
814814
(NormalizedFilePath -> Bool) ->
815815
DiagnosticStore ->
816816
DiagnosticStore
817817
filterDiagnostics keep =
818-
Map.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
818+
HMap.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
819819

820820
filterVersionMap
821821
:: Map NormalizedUri (Set.Set TextDocumentVersion)

src/Development/IDE/Types/Location.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -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
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-16
22
packages:
33
- .
44
extra-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
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-21
22
packages:
33
- .
44
extra-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
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ packages:
55
extra-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
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ packages:
33
- .
44
extra-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
69
nix:
710
packages: [zlib]

0 commit comments

Comments
 (0)