Skip to content

Commit 0f5df94

Browse files
committed
managed to build in 9.12.2 without SMethod_TextDocumentImplementation
1 parent f822964 commit 0f5df94

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

ghcide/src/Development/IDE/Core/PluginUtils.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ import Development.IDE.Types.Location (NormalizedFilePath, Range
5656
import qualified Development.IDE.Types.Location as Location
5757
import qualified Ide.Logger as Logger
5858
import Ide.Plugin.Error
59-
import Ide.Types
6059
import qualified Language.LSP.Protocol.Lens as LSP
6160
import Language.LSP.Protocol.Message (SMethod (..))
6261
import qualified Language.LSP.Protocol.Types as LSP
6362
import qualified StmContainers.Map as STM
6463
import qualified Language.LSP.Protocol.Lens as L
65-
import Ide.Types (FormattingMethod, FormattingHandler, PluginHandlers, PluginMethodHandler, mkPluginHandler, FormattingType (FormatText, FormatRange))
64+
import Ide.Types (FormattingHandler, PluginHandlers, FormattingMethod, PluginMethodHandler, mkPluginHandler, FormattingType (..))
6665

6766
-- ----------------------------------------------------------------------------
6867
-- Action wrappers

ghcide/src/Development/IDE/GHC/Compat.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,16 @@ data GhcVersion
454454
| GHC96
455455
| GHC98
456456
| GHC910
457+
| GHC912
457458
deriving (Eq, Ord, Show, Enum)
458459

459460
ghcVersionStr :: String
460461
ghcVersionStr = VERSION_ghc
461462

462463
ghcVersion :: GhcVersion
463-
#if MIN_VERSION_GLASGOW_HASKELL(9,10,0,0)
464+
#if MIN_VERSION_GLASGOW_HASKELL(9,12,0,0)
465+
ghcVersion = GHC912
466+
#elif MIN_VERSION_GLASGOW_HASKELL(9,10,0,0)
464467
ghcVersion = GHC910
465468
#elif MIN_VERSION_GLASGOW_HASKELL(9,8,0,0)
466469
ghcVersion = GHC98

ghcide/src/Development/IDE/Plugin/HLS/GhcIde.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ descriptor recorder plId = (defaultPluginDescriptor plId desc)
5151
Hover.gotoDefinition recorder ide TextDocumentPositionParams{..})
5252
<> mkPluginHandler SMethod_TextDocumentTypeDefinition (\ide _ TypeDefinitionParams{..} ->
5353
Hover.gotoTypeDefinition recorder ide TextDocumentPositionParams{..})
54-
<> mkPluginHandler SMethod_TextDocumentImplementation (\ide _ ImplementationParams{..} ->
55-
Hover.gotoImplementation recorder ide TextDocumentPositionParams{..})
54+
-- <> mkPluginHandler SMethod_TextDocumentImplementation (\ide _ ImplementationParams{..} ->
55+
-- Hover.gotoImplementation recorder ide TextDocumentPositionParams{..})
5656
<> mkPluginHandler SMethod_TextDocumentDocumentHighlight (\ide _ DocumentHighlightParams{..} ->
5757
Hover.documentHighlight recorder ide TextDocumentPositionParams{..})
5858
<> mkPluginHandler SMethod_TextDocumentReferences (Hover.references recorder)

ghcide/test/exe/UnitTests.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import System.IO.Extra hiding (withTempDir)
3030
import System.Mem (performGC)
3131
import Test.Hls (IdeState, def,
3232
runSessionWithServerInTmpDir,
33-
waitForProgressDone)
33+
waitForProgressDone, GhcVersion (GHC912), knownBrokenForGhcVersions)
3434
import Test.Tasty
3535
import Test.Tasty.ExpectedFailure
3636
import Test.Tasty.HUnit
@@ -97,7 +97,7 @@ tests = do
9797
let msg = printf "Timestamps do not have millisecond resolution: %dus" resolution_us
9898
assertBool msg (resolution_us <= 1000)
9999
, Progress.tests
100-
, FuzzySearch.tests
100+
, knownBrokenForGhcVersions [GHC912] "referenceImplementation get stuck" FuzzySearch.tests
101101
]
102102

103103
findResolution_us :: Int -> IO Int

0 commit comments

Comments
 (0)