Skip to content

Commit a7321ac

Browse files
authored
follow change in lsp-types (#1985)
* follow change in lsp-types * fix version constraint * Fix hlint
1 parent 8d44068 commit a7321ac

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

ghcide/.hlint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
- Development.IDE.Plugin.CodeAction
107107
- Development.IDE.Plugin.Completions
108108
- Development.IDE.Plugin.Completions.Logic
109+
- Development.IDE.Types.Location
109110
- Main
110111

111112
- flags:

ghcide/ghcide.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ library
6060
hls-plugin-api ^>= 1.1.0.0,
6161
lens,
6262
hiedb == 0.3.0.*,
63-
lsp-types == 1.2.*,
63+
lsp-types >= 1.2 && < 1.4,
6464
lsp == 1.2.*,
6565
mtl,
6666
network-uri,
@@ -343,7 +343,7 @@ test-suite ghcide-tests
343343
hls-plugin-api,
344344
network-uri,
345345
lens,
346-
lsp-test == 0.14.0.0,
346+
lsp-test ^>= 0.14,
347347
optparse-applicative,
348348
process,
349349
QuickCheck,
@@ -403,7 +403,7 @@ executable ghcide-bench
403403
extra,
404404
filepath,
405405
ghcide,
406-
lsp-test == 0.14.0.0,
406+
lsp-test,
407407
optparse-applicative,
408408
process,
409409
safe-exceptions,

ghcide/src/Development/IDE/Types/Location.hs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
22
-- SPDX-License-Identifier: Apache-2.0
3+
{-# LANGUAGE CPP #-}
34

45

56
-- | Types and functions for working with source code locations.
@@ -43,7 +44,11 @@ toNormalizedFilePath' "" = emptyFilePath
4344
toNormalizedFilePath' fp = LSP.toNormalizedFilePath fp
4445

4546
emptyFilePath :: LSP.NormalizedFilePath
47+
#if MIN_VERSION_lsp_types(1,3,0)
48+
emptyFilePath = LSP.normalizedFilePath emptyPathUri ""
49+
#else
4650
emptyFilePath = LSP.NormalizedFilePath emptyPathUri ""
51+
#endif
4752

4853
-- | We use an empty string as a filepath when we don’t have a file.
4954
-- However, haskell-lsp doesn’t support that in uriToFilePath and given

hls-test-utils/hls-test-utils.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ library
4848
, hspec-core
4949
, lens
5050
, lsp ^>=1.2
51-
, lsp-test ==0.14.0.0
52-
, lsp-types ^>=1.2
51+
, lsp-test ^>=0.14
52+
, lsp-types >=1.2 && < 1.4
5353
, tasty
5454
, tasty-expected-failure
5555
, tasty-golden

0 commit comments

Comments
 (0)