hls-rename-plugin 1.0.1.0 → 1.0.2.0
raw patch · 3 files changed
+17/−12 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.Rename: data Log
Files
- hls-rename-plugin.cabal +8/−4
- src/Ide/Plugin/Rename.hs +7/−6
- test/Main.hs +2/−2
hls-rename-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-rename-plugin-version: 1.0.1.0+version: 1.0.2.0 synopsis: Rename plugin for Haskell Language Server description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -16,6 +16,10 @@ test/testdata/*.hs test/testdata/*.yaml +source-repository head+ type: git+ location: https://github.com/haskell/haskell-language-server.git+ library if impl(ghc >= 9.3) buildable: False@@ -29,10 +33,10 @@ , extra , ghc , ghc-exactprint- , ghcide ^>=1.8+ , ghcide ^>=1.8 || ^>= 1.9 , hashable , hiedb- , hls-plugin-api ^>= 1.3 || ^>=1.4 || ^>= 1.5+ , hls-plugin-api ^>= 1.3 || ^>=1.4 || ^>= 1.5 || ^>= 1.6 , hls-refactor-plugin , lsp , lsp-types@@ -61,4 +65,4 @@ , filepath , hls-plugin-api , hls-rename-plugin- , hls-test-utils ^>=1.4+ , hls-test-utils ^>=1.5
src/Ide/Plugin/Rename.hs view
@@ -9,7 +9,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} -module Ide.Plugin.Rename (descriptor) where+module Ide.Plugin.Rename (descriptor, E.Log) where #if MIN_VERSION_ghc(9,2,1) import GHC.Parser.Annotation (AnnContext, AnnList,@@ -29,7 +29,8 @@ import Data.Maybe import Data.Mod.Word import qualified Data.Text as T-import Development.IDE (Recorder, WithPriority)+import Development.IDE (Recorder, WithPriority,+ usePropertyAction) import Development.IDE.Core.PositionMapping import Development.IDE.Core.RuleTypes import Development.IDE.Core.Service@@ -40,10 +41,10 @@ import Development.IDE.GHC.Compat.Units import Development.IDE.GHC.Error import Development.IDE.GHC.ExactPrint-import qualified Development.IDE.GHC.ExactPrint as E+import qualified Development.IDE.GHC.ExactPrint as E+import Development.IDE.Plugin.CodeAction import Development.IDE.Spans.AtPoint import Development.IDE.Types.Location-import Development.IDE.Plugin.CodeAction import HieDb.Query import Ide.Plugin.Properties import Ide.PluginUtils@@ -77,7 +78,7 @@ refs <- HS.fromList . concat <$> mapM (refsAtName state nfp) oldNames -- Validate rename- crossModuleEnabled <- lift $ usePropertyLsp #crossModule pluginId properties+ crossModuleEnabled <- liftIO $ runAction "rename: config" state $ usePropertyAction #crossModule pluginId properties unless crossModuleEnabled $ failWhenImportOrExport state nfp refs oldNames when (any isBuiltInSyntax oldNames) $ throwE "Invalid rename of built-in syntax" @@ -176,7 +177,7 @@ --------------------------------------------------------------------------------------------------- -- Reference finding --- | Note: We only find exact name occurences (i.e. type reference "depth" is 0).+-- | Note: We only find exact name occurrences (i.e. type reference "depth" is 0). refsAtName :: MonadIO m => IdeState ->
test/Main.hs view
@@ -12,8 +12,8 @@ main :: IO () main = defaultTestRunner tests -renamePlugin :: PluginDescriptor IdeState-renamePlugin = Rename.descriptor mempty "rename"+renamePlugin :: PluginTestDescriptor Rename.Log+renamePlugin = mkPluginTestDescriptor Rename.descriptor "rename" -- See https://github.com/wz1000/HieDb/issues/45 recordConstructorIssue :: String