hls-explicit-imports-plugin 2.1.0.0 → 2.2.0.0
raw patch · 3 files changed
+8/−8 lines, 3 filesdep ~ghcidedep ~hls-plugin-apiPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghcide, hls-plugin-api
API changes (from Hackage documentation)
Files
hls-explicit-imports-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hls-explicit-imports-plugin-version: 2.1.0.0+version: 2.2.0.0 synopsis: Explicit imports plugin for Haskell Language Server description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -38,9 +38,9 @@ , containers , deepseq , ghc- , ghcide == 2.1.0.0+ , ghcide == 2.2.0.0 , hls-graph- , hls-plugin-api == 2.1.0.0+ , hls-plugin-api == 2.2.0.0 , lens , lsp , mtl
src/Ide/Plugin/ExplicitImports.hs view
@@ -73,7 +73,7 @@ instance Pretty Log where pretty = \case LogShake logMsg -> pretty logMsg- LogWAEResponseError rspErr -> "RequestWorkspaceApplyEdit Failed with " <+> viaShow rspErr+ LogWAEResponseError rspErr -> "RequestWorkspaceApplyEdit Failed with " <+> pretty rspErr LogResolve msg -> pretty msg -- | The "main" function of a plugin
test/Main.hs view
@@ -42,12 +42,12 @@ , codeActionBreakFile "ExplicitBreakFile" 4 0 , codeActionStaleAction "ExplicitStaleAction" 4 0 , testCase "No CodeAction when exported" $- runSessionWithServer explicitImportsPlugin testDataDir $ do+ runSessionWithServer def explicitImportsPlugin testDataDir $ do doc <- openDoc "ExplicitExported.hs" "haskell" action <- getCodeActions doc (pointRange 3 0) liftIO $ action @?= [] , testCase "No CodeLens when exported" $- runSessionWithServer explicitImportsPlugin testDataDir $ do+ runSessionWithServer def explicitImportsPlugin testDataDir $ do doc <- openDoc "ExplicitExported.hs" "haskell" lenses <- getCodeLenses doc liftIO $ lenses @?= []@@ -106,7 +106,7 @@ case find ((== Just "Make this import explicit") . caTitle) actions of Just (InR x) -> maybeResolveCodeAction x >>=- \case Just _ -> liftIO $ assertFailure "Code action still valid"+ \case Just _ -> liftIO $ assertFailure "Code action still valid" Nothing -> pure () _ -> liftIO $ assertFailure "Unable to find CodeAction" where edit = TextDocumentContentChangeEvent $ InL $ #range .== Range (Position 6 0) (Position 6 0)@@ -169,7 +169,7 @@ -- helpers goldenWithImportActions :: String -> FilePath -> ClientCapabilities -> (TextDocumentIdentifier -> Session ()) -> TestTree-goldenWithImportActions title fp caps = goldenWithHaskellAndCaps caps explicitImportsPlugin (fp <> title <> " (golden)") testDataDir fp "expected" "hs"+goldenWithImportActions title fp caps = goldenWithHaskellAndCaps def caps explicitImportsPlugin (fp <> title <> " (golden)") testDataDir fp "expected" "hs" testDataDir :: String testDataDir = "test" </> "testdata"