Upgrade to haskell-lsp-0.20 (#405)

This commit is contained in:
Moritz Kiefer 2020-02-05 10:14:13 +01:00 committed by GitHub
parent 368cff7af5
commit e59d3e2c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 16 deletions

View File

@ -43,8 +43,8 @@ library
filepath,
haddock-library >= 1.8,
hashable,
haskell-lsp-types == 0.19.*,
haskell-lsp == 0.19.*,
haskell-lsp-types == 0.20.*,
haskell-lsp == 0.20.*,
mtl,
network-uri,
prettyprinter-ansi-terminal,

View File

@ -414,7 +414,7 @@ shakeRun IdeState{shakeExtras=ShakeExtras{..}, ..} acts =
profile = case res of
Right (_, Just fp) ->
let link = case filePathToUri' $ toNormalizedFilePath fp of
NormalizedUri x -> x
NormalizedUri _ x -> x
in ", profile saved at " <> T.unpack link
_ -> ""
let logMsg = logDebug logger $ T.pack $
@ -800,7 +800,7 @@ getAllDiagnostics ::
DiagnosticStore ->
[FileDiagnostic]
getAllDiagnostics =
concatMap (\(k,v) -> map (fromUri k,ShowDiag,) $ getDiagnosticsFromStore v) . Map.toList
concatMap (\(k,v) -> map (fromUri k,ShowDiag,) $ getDiagnosticsFromStore v) . HMap.toList
getFileDiagnostics ::
NormalizedFilePath ->
@ -808,14 +808,14 @@ getFileDiagnostics ::
[LSP.Diagnostic]
getFileDiagnostics fp ds =
maybe [] getDiagnosticsFromStore $
Map.lookup (filePathToUri' fp) ds
HMap.lookup (filePathToUri' fp) ds
filterDiagnostics ::
(NormalizedFilePath -> Bool) ->
DiagnosticStore ->
DiagnosticStore
filterDiagnostics keep =
Map.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
HMap.filterWithKey (\uri _ -> maybe True (keep . toNormalizedFilePath) $ uriToFilePath' $ fromNormalizedUri uri)
filterVersionMap
:: Map NormalizedUri (Set.Set TextDocumentVersion)

View File

@ -122,7 +122,8 @@ filePathToUriInternal' fp = toNormalizedUri $ Uri $ T.pack $ LSP.fileScheme <> "
toNormalizedUri :: Uri -> NormalizedUri
toNormalizedUri (Uri t) =
NormalizedUri $ T.pack $ escapeURIString isUnescapedInURI $ unEscapeString $ T.unpack t
let fp = T.pack $ escapeURIString isUnescapedInURI $ unEscapeString $ T.unpack t
in NormalizedUri (hash fp) fp
platformAdjustToUriPath :: FilePath -> String
platformAdjustToUriPath srcPath

View File

@ -2,9 +2,9 @@ resolver: nightly-2019-09-16
packages:
- .
extra-deps:
- haskell-lsp-0.19.0.0
- haskell-lsp-types-0.19.0.0
- lsp-test-0.10.0.0
- haskell-lsp-0.20.0.0
- haskell-lsp-types-0.20.0.0
- lsp-test-0.10.1.0
- hie-bios-0.4.0
- ghc-lib-parser-8.8.1
- ghc-lib-8.8.1

View File

@ -2,9 +2,9 @@ resolver: nightly-2019-09-21
packages:
- .
extra-deps:
- haskell-lsp-0.19.0.0
- haskell-lsp-types-0.19.0.0
- lsp-test-0.10.0.0
- haskell-lsp-0.20.0.0
- haskell-lsp-types-0.20.0.0
- lsp-test-0.10.1.0
- hie-bios-0.4.0
- fuzzy-0.1.0.0
- regex-pcre-builtin-0.95.1.1.8.43

View File

@ -5,9 +5,9 @@ packages:
extra-deps:
- aeson-1.4.6.0
- base-orphans-0.8.2
- haskell-lsp-0.19.0.0
- haskell-lsp-types-0.19.0.0
- lsp-test-0.10.0.0
- haskell-lsp-0.20.0.0
- haskell-lsp-types-0.20.0.0
- lsp-test-0.10.1.0
- rope-utf16-splay-0.3.1.0
- filepattern-0.1.1
- js-dgtable-0.5.2

View File

@ -3,5 +3,8 @@ packages:
- .
extra-deps:
- fuzzy-0.1.0.0
- haskell-lsp-0.20.0.0
- haskell-lsp-types-0.20.0.0
- lsp-test-0.10.1.0
nix:
packages: [zlib]