packages feed

hls-eval-plugin 1.3.0.0 → 1.4.0.0

raw patch · 4 files changed

+14/−24 lines, 4 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-eval-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-eval-plugin-version:            1.3.0.0+version:            1.4.0.0 synopsis:           Eval plugin for Haskell Language Server description:   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -70,10 +70,10 @@     , ghc     , ghc-boot-th     , ghc-paths-    , ghcide                ^>=1.8+    , ghcide                ^>=1.9     , hashable     , hls-graph-    , hls-plugin-api        ^>=1.5+    , hls-plugin-api        ^>=1.6     , lens     , lsp     , lsp-types@@ -119,7 +119,7 @@     , filepath     , hls-eval-plugin     , hls-plugin-api-    , hls-test-utils   ^>=1.4+    , hls-test-utils   ^>=1.5     , lens     , lsp-types     , text
src/Ide/Plugin/Eval/CodeLens.hs view
@@ -32,7 +32,6 @@ import           Control.Monad                                (guard, join,                                                                void, when) import           Control.Monad.IO.Class                       (MonadIO (liftIO))-import           Control.Monad.Trans                          (lift) import           Control.Monad.Trans.Except                   (ExceptT (..)) import           Data.Aeson                                   (toJSON) import           Data.Char                                    (isSpace)@@ -102,7 +101,6 @@  import           Development.IDE.Core.FileStore               (setSomethingModified) import           Development.IDE.Types.Shake                  (toKey)-import           Ide.Plugin.Config                            (Config) #if MIN_VERSION_ghc(9,2,0) import           GHC.Types.SrcLoc                             (UnhelpfulSpanReason (UnhelpfulInteractive)) #endif@@ -305,9 +303,6 @@ #endif                  -- Load the module with its current content (as the saved module might not be up to date)-                -- BUG: this fails for files that requires preprocessors (e.g. CPP) for ghc < 8.8-                -- see https://gitlab.haskell.org/ghc/ghc/-/issues/17066-                -- and https://hackage.haskell.org/package/ghc-8.10.1/docs/GHC.html#v:TargetFile                 eSetTarget <- gStrictTry $ setTargets [thisModuleTarget]                 dbg "setTarget" eSetTarget @@ -323,7 +318,7 @@                         -- Evaluation takes place 'inside' the module                         setContext [Compat.IIModule modName]                         Right <$> getSession-            evalCfg <- lift $ getEvalConfig plId+            evalCfg <- liftIO $ runAction "eval: config" st $ getEvalConfig plId              -- Get linkables for all modules below us             -- This can be optimised to only get the linkables for the symbols depended on by
src/Ide/Plugin/Eval/Config.hs view
@@ -7,11 +7,9 @@   , EvalConfig(..)   ) where -import           Ide.Plugin.Config     (Config)+import           Development.IDE import           Ide.Plugin.Properties-import           Ide.PluginUtils       (usePropertyLsp) import           Ide.Types             (PluginId)-import           Language.LSP.Server   (MonadLsp)  -- | The Eval plugin configuration. (see 'properties') data EvalConfig = EvalConfig@@ -30,8 +28,8 @@   & defineBooleanProperty #exception     "Enable marking exceptions with `*** Exception:` similarly to doctest and GHCi." False -getEvalConfig :: (MonadLsp Config m) => PluginId -> m EvalConfig+getEvalConfig :: PluginId -> Action EvalConfig getEvalConfig plId =     EvalConfig-    <$> usePropertyLsp #diff plId properties-    <*> usePropertyLsp #exception plId properties+    <$> usePropertyAction #diff plId properties+    <*> usePropertyAction #exception plId properties
test/Main.hs view
@@ -29,8 +29,8 @@ main :: IO () main = defaultTestRunner tests -evalPlugin :: PluginDescriptor IdeState-evalPlugin = Eval.descriptor mempty "eval"+evalPlugin :: PluginTestDescriptor Eval.Log+evalPlugin = mkPluginTestDescriptor Eval.descriptor "eval"  tests :: TestTree tests =@@ -140,13 +140,10 @@   , goldenWithEval "Can handle eval inside nested comment properly" "TNested" "hs"   , goldenWithEval "Test on last line insert results correctly" "TLastLine" "hs"   , testGroup "with preprocessors"-    [ knownBrokenInEnv [HostOS Windows, GhcVer GHC86]+    [ knownBrokenInEnv [HostOS Windows]         "CPP eval on Windows and/or GHC <= 8.6 fails for some reasons" $-          goldenWithEval "CPP support" "TCPP" "hs"-    , knownBrokenForGhcVersions [GHC86]-        "Preprocessor known to fail on GHC <= 8.6" $-          goldenWithEval "Literate Haskell Bird Style" "TLHS" "lhs"-    -- , goldenWithEval "Literate Haskell LaTeX Style" "TLHSLateX" "lhs"+        goldenWithEval "CPP support" "TCPP" "hs"+    , goldenWithEval "Literate Haskell Bird Style" "TLHS" "lhs"     ]   , goldenWithEval "Works with NoImplicitPrelude" "TNoImplicitPrelude" "hs"   , goldenWithEval "Variable 'it' works" "TIt" "hs"