Skip to content

follow change in lsp-types #1985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ghcide/.hlint.yaml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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