Skip to content

Commit

Permalink
follow change in lsp-types (#1985)
Browse files Browse the repository at this point in the history
* follow change in lsp-types

* fix version constraint

* Fix hlint
  • Loading branch information
pepeiborra committed Jun 29, 2021
1 parent 8d44068 commit a7321ac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions ghcide/.hlint.yaml
Expand Up @@ -106,6 +106,7 @@
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.Completions
- Development.IDE.Plugin.Completions.Logic
- Development.IDE.Types.Location
- Main

- flags:
Expand Down
6 changes: 3 additions & 3 deletions ghcide/ghcide.cabal
Expand Up @@ -60,7 +60,7 @@ library
hls-plugin-api ^>= 1.1.0.0,
lens,
hiedb == 0.3.0.*,
lsp-types == 1.2.*,
lsp-types >= 1.2 && < 1.4,
lsp == 1.2.*,
mtl,
network-uri,
Expand Down Expand Up @@ -343,7 +343,7 @@ test-suite ghcide-tests
hls-plugin-api,
network-uri,
lens,
lsp-test == 0.14.0.0,
lsp-test ^>= 0.14,
optparse-applicative,
process,
QuickCheck,
Expand Down Expand Up @@ -403,7 +403,7 @@ executable ghcide-bench
extra,
filepath,
ghcide,
lsp-test == 0.14.0.0,
lsp-test,
optparse-applicative,
process,
safe-exceptions,
Expand Down
5 changes: 5 additions & 0 deletions ghcide/src/Development/IDE/Types/Location.hs
@@ -1,5 +1,6 @@
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
{-# LANGUAGE CPP #-}


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

emptyFilePath :: LSP.NormalizedFilePath
#if MIN_VERSION_lsp_types(1,3,0)
emptyFilePath = LSP.normalizedFilePath emptyPathUri ""
#else
emptyFilePath = LSP.NormalizedFilePath emptyPathUri ""
#endif

-- | We use an empty string as a filepath when we don’t have a file.
-- However, haskell-lsp doesn’t support that in uriToFilePath and given
Expand Down
4 changes: 2 additions & 2 deletions hls-test-utils/hls-test-utils.cabal
Expand Up @@ -48,8 +48,8 @@ library
, hspec-core
, lens
, lsp ^>=1.2
, lsp-test ==0.14.0.0
, lsp-types ^>=1.2
, lsp-test ^>=0.14
, lsp-types >=1.2 && < 1.4
, tasty
, tasty-expected-failure
, tasty-golden
Expand Down

0 comments on commit a7321ac

Please sign in to comment.