Skip to content

Commit f55af25

Browse files
committed
follow change in lsp-types
1 parent b970e25 commit f55af25

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

ghcide/ghcide.cabal

Lines changed: 3 additions & 3 deletions
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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)