packages feed

hls-module-name-plugin 1.1.0.0 → 1.1.1.0

raw patch · 3 files changed

+13/−8 lines, 3 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)

+ Ide.Plugin.ModuleName: data Log

Files

hls-module-name-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-module-name-plugin-version:            1.1.0.0+version:            1.1.1.0 synopsis:           Module name plugin for Haskell Language Server description:   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -19,6 +19,10 @@   test/testdata/**/*.cabal   test/testdata/**/*.project +source-repository head+    type:     git+    location: https://github.com/haskell/haskell-language-server.git+ library   buildable: True   exposed-modules:  Ide.Plugin.ModuleName@@ -28,8 +32,8 @@     , base                  >=4.12 && <5     , directory     , filepath-    , ghcide                ^>=1.8-    , hls-plugin-api        ^>=1.5+    , ghcide                ^>=1.9+    , hls-plugin-api        ^>=1.6     , lsp     , text     , transformers@@ -48,4 +52,4 @@     , base     , filepath     , hls-module-name-plugin-    , hls-test-utils          ^>=1.4+    , hls-test-utils          ^>=1.5
src/Ide/Plugin/ModuleName.hs view
@@ -14,6 +14,7 @@ -} module Ide.Plugin.ModuleName (     descriptor,+    Log, ) where  import           Control.Monad                (forM_, void)@@ -33,7 +34,7 @@ import           Development.IDE              (GetParsedModule (GetParsedModule),                                                GhcSession (GhcSession),                                                IdeState, Pretty,-                                               Priority (Debug, Info), Recorder,+                                               Priority (Debug), Recorder,                                                WithPriority, colon, evalGhcEnv,                                                hscEnvWithImportPaths, logWith,                                                realSrcSpanToRange, runAction,@@ -112,7 +113,7 @@     correctNames <- liftIO $ pathModuleNames recorder state nfp fp     logWith recorder Debug (CorrectNames correctNames)     bestName <- minimumBy (comparing T.length) <$> (MaybeT . pure $ NE.nonEmpty correctNames)-    logWith recorder Info (BestName bestName)+    logWith recorder Debug (BestName bestName)      statedNameMaybe <- liftIO $ codeModuleName state nfp     logWith recorder Debug (ModuleName $ snd <$> statedNameMaybe)
test/Main.hs view
@@ -12,8 +12,8 @@ main :: IO () main = defaultTestRunner tests -moduleNamePlugin :: PluginDescriptor IdeState-moduleNamePlugin = ModuleName.descriptor mempty "moduleName"+moduleNamePlugin :: PluginTestDescriptor ModuleName.Log+moduleNamePlugin = mkPluginTestDescriptor ModuleName.descriptor "moduleName"  tests :: TestTree tests =