diff --git a/CODEOWNERS b/CODEOWNERS index fa6be0f263..fbed53aac0 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -15,7 +15,7 @@ /plugins/hls-class-plugin @Ailrun /plugins/hls-eval-plugin /plugins/hls-explicit-imports-plugin @pepeiborra -/plugins/hls-floskell-plugin @Ailrun +/plugins/hls-floskell-plugin @Ailrun @peterbecich /plugins/hls-fourmolu-plugin @georgefst /plugins/hls-gadt-plugin @July541 /plugins/hls-hlint-plugin @eddiemundo diff --git a/plugins/hls-floskell-plugin/CHANGELOG.md b/plugins/hls-floskell-plugin/CHANGELOG.md new file mode 100644 index 0000000000..e18ef08cd6 --- /dev/null +++ b/plugins/hls-floskell-plugin/CHANGELOG.md @@ -0,0 +1,4 @@ +# Revision history for hls-floskell-plugin + +## 2.5.1.0 -- 2024-01-05 +Updates Floskell dependency to 0.11.*, which supports Aeson 2.2.* diff --git a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal index 9f0b1712ee..6ca0e409c4 100644 --- a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal +++ b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal @@ -28,7 +28,7 @@ library hs-source-dirs: src build-depends: , base >=4.12 && <5 - , floskell ^>=0.10.8 + , floskell ^>=0.11.0 , ghcide == 2.5.0.0 , hls-plugin-api == 2.5.0.0 , lsp-types ^>=2.1 diff --git a/plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs b/plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs index 77800f4066..e030ef7f2c 100644 --- a/plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs +++ b/plugins/hls-floskell-plugin/src/Ide/Plugin/Floskell.hs @@ -39,10 +39,10 @@ provider _ideState typ contents fp _ = do let (range, selectedContents) = case typ of FormatText -> (fullRange contents, contents) FormatRange r -> (normalize r, extractTextInRange (extendToFullLines r) contents) - result = reformat config (Just file) . TL.encodeUtf8 $ TL.fromStrict selectedContents + result = reformat config (Just file) $ TL.fromStrict selectedContents case result of Left err -> throwError $ PluginInternalError $ T.pack $ "floskellCmd: " ++ err - Right new -> pure $ InL [TextEdit range . TL.toStrict $ TL.decodeUtf8 new] + Right new -> pure $ InL [TextEdit range $ TL.toStrict new] -- | Find Floskell Config, user and system wide or provides a default style. -- Every directory of the filepath will be searched to find a user configuration. diff --git a/stack-lts21.yaml b/stack-lts21.yaml index b1d4d8632b..55ea89b301 100644 --- a/stack-lts21.yaml +++ b/stack-lts21.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.2 # ghc-9.4 +resolver: lts-21.25 # ghc-9.4 packages: - . @@ -44,12 +44,11 @@ ghc-options: allow-newer: true extra-deps: -- floskell-0.10.7 +- floskell-0.11.1 - hiedb-0.4.4.0 - hie-bios-0.13.1 - implicit-hie-0.1.4.0 - monad-dijkstra-0.1.1.3 -- algebraic-graphs-0.6.1 - retrie-1.2.2 - stylish-haskell-0.14.4.0 - lsp-2.3.0.0 @@ -59,11 +58,8 @@ extra-deps: # stan dependencies not found in the stackage snapshot - stan-0.1.0.2 - clay-0.14.0 -- colourista-0.1.0.2 - dir-traverse-0.2.3.0 - extensions-0.1.0.0 -- relude-1.2.1.0 -- slist-0.2.1.0 - tomland-1.3.3.2 - trial-0.0.0.0 - trial-optparse-applicative-0.0.0.0 diff --git a/stack.yaml b/stack.yaml index f399c3aa2e..0c927eb542 100644 --- a/stack.yaml +++ b/stack.yaml @@ -43,7 +43,7 @@ ghc-options: allow-newer: true extra-deps: -- floskell-0.10.8 +- floskell-0.11.1 - retrie-1.2.2 - hiedb-0.4.4.0 - implicit-hie-0.1.4.0