packages feed

hls-class-plugin 2.1.0.0 → 2.2.0.0

raw patch · 2 files changed

+11/−11 lines, 2 filesdep ~ghcidedep ~hls-plugin-apidep ~hls-test-utilsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ghcide, hls-plugin-api, hls-test-utils

API changes (from Hackage documentation)

Files

hls-class-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-class-plugin-version:            2.1.0.0+version:            2.2.0.0 synopsis:   Class/instance management plugin for Haskell Language Server @@ -39,10 +39,10 @@     , deepseq     , extra     , ghc-    , ghcide          == 2.1.0.0+    , ghcide          == 2.2.0.0     , ghc-boot-th     , hls-graph-    , hls-plugin-api  == 2.1.0.0+    , hls-plugin-api  == 2.2.0.0     , lens     , lsp     , mtl@@ -75,7 +75,7 @@     , ghcide     , hls-class-plugin     , hls-plugin-api-    , hls-test-utils     == 2.1.0.0+    , hls-test-utils     == 2.2.0.0     , lens     , lsp-types     , row-types
test/Main.hs view
@@ -81,7 +81,7 @@       [ "Add placeholders for 'f','g'"       , "Add placeholders for 'f','g' with signature(s)"       ]-  , testCase "Update text document version" $ runSessionWithServer classPlugin testDataDir $ do+  , testCase "Update text document version" $ runSessionWithServer def classPlugin testDataDir $ do     doc <- createDoc "Version.hs" "haskell" "module Version where"     ver1 <- (^. L.version) <$> getVersionedDoc doc     liftIO $ ver1 @?= 0@@ -109,7 +109,7 @@ codeLensTests = testGroup     "code lens"     [ testCase "Has code lens" $ do-        runSessionWithServer classPlugin testDataDir $ do+        runSessionWithServer def classPlugin testDataDir $ do             doc <- openDoc "CodeLensSimple.hs" "haskell"             lens <- getCodeLenses doc             let titles = map (^. L.title) $ mapMaybe (^. L.command) lens@@ -118,7 +118,7 @@                 , "(==) :: A -> A -> Bool"                 ]     , testCase "No lens for TH" $ do-        runSessionWithServer classPlugin testDataDir $ do+        runSessionWithServer def classPlugin testDataDir $ do             doc <- openDoc "TH.hs" "haskell"             lens <- getCodeLenses doc             liftIO $ length lens @?= 0@@ -131,7 +131,7 @@     , goldenCodeLens "Qualified name" "Qualified" 0     , goldenCodeLens "Type family" "TypeFamily" 0     , testCase "keep stale lens" $ do-        runSessionWithServer classPlugin testDataDir $ do+        runSessionWithServer def classPlugin testDataDir $ do             doc <- openDoc "Stale.hs" "haskell"             oldLens <- getCodeLenses doc             let edit = TextEdit (mkRange 4 11 4 12) "" -- Remove the `_`@@ -147,14 +147,14 @@  goldenCodeLens :: TestName -> FilePath -> Int -> TestTree goldenCodeLens title path idx =-    goldenWithHaskellDoc classPlugin title testDataDir path "expected" "hs" $ \doc -> do+    goldenWithHaskellDoc def classPlugin title testDataDir path "expected" "hs" $ \doc -> do         lens <- getCodeLenses doc         executeCommand $ fromJust $ (lens !! idx) ^. L.command         void $ skipManyTill anyMessage (message SMethod_WorkspaceApplyEdit)  goldenWithClass ::TestName -> FilePath -> FilePath -> ([CodeAction] -> Session ()) -> TestTree goldenWithClass title path desc act =-  goldenWithHaskellDoc classPlugin title testDataDir path (desc <.> "expected") "hs" $ \doc -> do+  goldenWithHaskellDoc def classPlugin title testDataDir path (desc <.> "expected") "hs" $ \doc -> do     _ <- waitForDiagnosticsFromSource doc (T.unpack sourceTypecheck)     actions <- concatMap (^.. _CACodeAction) <$> getAllCodeActions doc     act actions@@ -163,7 +163,7 @@ expectCodeActionsAvailable :: TestName -> FilePath -> [T.Text] -> TestTree expectCodeActionsAvailable title path actionTitles =   testCase title $ do-    runSessionWithServer classPlugin testDataDir $ do+    runSessionWithServer def classPlugin testDataDir $ do       doc <- openDoc (path <.> "hs") "haskell"       _ <- waitForDiagnosticsFromSource doc (T.unpack sourceTypecheck)       caResults <- getAllCodeActions doc