From 5e24ea3d2322823d6d640b4e1790c7d671d6c2f8 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Tue, 23 Nov 2021 09:43:10 +0000 Subject: [PATCH 1/3] Revert "Update to latest prettyprinter API (#2352)" This reverts commit 1eb133f09838c473860ee516a9304cd8c1145e7b. This change breaks compatibility with Stackage LTS 16 (GHC 8.8) --- ghcide/ghcide.cabal | 2 +- ghcide/src/Development/IDE/Types/Diagnostics.hs | 8 ++++---- .../src/Wingman/Metaprogramming/Parser/Documentation.hs | 4 ++-- .../src/Wingman/Metaprogramming/ProofState.hs | 4 ++-- stack-8.10.5.yaml | 1 - stack-8.10.6.yaml | 1 - stack-8.10.7.yaml | 1 - stack-8.6.5.yaml | 2 -- stack-8.8.3.yaml | 1 - stack-8.8.4.yaml | 1 - stack-9.0.1.yaml | 1 - stack.yaml | 1 - 12 files changed, 9 insertions(+), 18 deletions(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index b38c757a93..609bb77611 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -71,7 +71,7 @@ library optparse-applicative, parallel, prettyprinter-ansi-terminal, - prettyprinter >= 1.7, + prettyprinter, regex-tdfa >= 1.3.1.0, retrie, rope-utf16-splay, diff --git a/ghcide/src/Development/IDE/Types/Diagnostics.hs b/ghcide/src/Development/IDE/Types/Diagnostics.hs index 46d480cca5..77c8ae5c6f 100644 --- a/ghcide/src/Development/IDE/Types/Diagnostics.hs +++ b/ghcide/src/Development/IDE/Types/Diagnostics.hs @@ -19,10 +19,10 @@ module Development.IDE.Types.Diagnostics ( import Control.DeepSeq import Data.Maybe as Maybe import qualified Data.Text as T -import Prettyprinter -import Prettyprinter.Render.Terminal (Color (..), color) -import qualified Prettyprinter.Render.Terminal as Terminal -import Prettyprinter.Render.Text +import Data.Text.Prettyprint.Doc +import Data.Text.Prettyprint.Doc.Render.Terminal (Color (..), color) +import qualified Data.Text.Prettyprint.Doc.Render.Terminal as Terminal +import Data.Text.Prettyprint.Doc.Render.Text import Language.LSP.Diagnostics import Language.LSP.Types as LSP (Diagnostic (..), DiagnosticSeverity (..), diff --git a/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/Parser/Documentation.hs b/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/Parser/Documentation.hs index 018e59b2ff..7b047513f8 100644 --- a/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/Parser/Documentation.hs +++ b/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/Parser/Documentation.hs @@ -6,8 +6,8 @@ import Data.Functor ((<&>)) import Data.List (sortOn) import Data.String (IsString) import Data.Text (Text) -import Prettyprinter hiding (parens) -import Prettyprinter.Render.String (renderString) +import Data.Text.Prettyprint.Doc hiding (parens) +import Data.Text.Prettyprint.Doc.Render.String (renderString) import Development.IDE.GHC.Compat (OccName) import qualified Text.Megaparsec as P import Wingman.Metaprogramming.Lexer (Parser, identifier, variable, parens) diff --git a/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/ProofState.hs b/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/ProofState.hs index a908e99031..5563b75c63 100644 --- a/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/ProofState.hs +++ b/plugins/hls-tactics-plugin/src/Wingman/Metaprogramming/ProofState.hs @@ -6,8 +6,8 @@ module Wingman.Metaprogramming.ProofState where import Data.Bool (bool) import Data.Functor ((<&>)) import qualified Data.Text as T -import Prettyprinter -import Prettyprinter.Render.Util.Panic +import Data.Text.Prettyprint.Doc +import Data.Text.Prettyprint.Doc.Render.Util.Panic import Language.LSP.Types (sectionSeparator) import Wingman.Judgements (jHypothesis) import Wingman.Types diff --git a/stack-8.10.5.yaml b/stack-8.10.5.yaml index 58303d1fcc..f94d4f74ef 100644 --- a/stack-8.10.5.yaml +++ b/stack-8.10.5.yaml @@ -64,7 +64,6 @@ extra-deps: - constraints-extras-0.3.1.0 - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 - lsp-1.2.0.1 - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 diff --git a/stack-8.10.6.yaml b/stack-8.10.6.yaml index bb46d4adc5..fafa2f08b0 100644 --- a/stack-8.10.6.yaml +++ b/stack-8.10.6.yaml @@ -46,7 +46,6 @@ extra-deps: - refinery-0.4.0.0@sha256:fe3a43add8ff1db5cfffee7e7694c86128b1dfe62c541f26e25a8eadf9585610,1663 - retrie-1.0.0.0@sha256:82014773115807f649f60fe4a3246911bbccd063a3c846cf5665e71f237bdd2d,4241 - stylish-haskell-0.12.2.0@sha256:38f7fd9ca30c9aad34f176dae4564576899e9c197b6b8557b59c5e8c6a622c74,6108 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 # Enable these when supported by all formatters # - ghc-lib-9.0.1.20210324@sha256:c8b9a2541ea3424c8d0e4f80584477d0f35be03f4a47d931152042d5f446c5fc,19279 diff --git a/stack-8.10.7.yaml b/stack-8.10.7.yaml index f547b801b0..04e7adf902 100644 --- a/stack-8.10.7.yaml +++ b/stack-8.10.7.yaml @@ -46,7 +46,6 @@ extra-deps: - refinery-0.4.0.0@sha256:fe3a43add8ff1db5cfffee7e7694c86128b1dfe62c541f26e25a8eadf9585610,1663 - retrie-1.0.0.0@sha256:82014773115807f649f60fe4a3246911bbccd063a3c846cf5665e71f237bdd2d,4241 - stylish-haskell-0.12.2.0@sha256:38f7fd9ca30c9aad34f176dae4564576899e9c197b6b8557b59c5e8c6a622c74,6108 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 # Enable these when supported by all formatters # - ghc-lib-9.0.1.20210324@sha256:c8b9a2541ea3424c8d0e4f80584477d0f35be03f4a47d931152042d5f446c5fc,19279 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index c67095b746..9f9532f626 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -100,8 +100,6 @@ extra-deps: - constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853 - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 - - prettyprinter-ansi-terminal-1.1.3 - resourcet-1.2.3 - lsp-1.2.0.1 - lsp-types-1.3.0.1 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 6ca6bb959f..543bf2edd9 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -80,7 +80,6 @@ extra-deps: - constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853 - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 - lsp-1.2.0.1 - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index 50f6ff3ef9..0bc74c05e2 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -77,7 +77,6 @@ extra-deps: - constraints-extras-0.3.0.2@sha256:013b8d0392582c6ca068e226718a4fe8be8e22321cc0634f6115505bf377ad26,1853 - some-1.0.1@sha256:26e5bab7276f48b25ea8660d3fd1166c0f20fd497dac879a40f408e23211f93e,2055 - unliftio-core-0.2.0.1@sha256:9b3e44ea9aacacbfc35b3b54015af450091916ac3618a41868ebf6546977659a,1082 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 - lsp-1.2.0.1 - lsp-types-1.3.0.1 - lsp-test-0.14.0.1 diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 7044e94b39..a34cd671a8 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -72,7 +72,6 @@ extra-deps: - Chart-1.9.3@sha256:640a38463318b070d80a049577e4f0b3322df98290abb7afcf0cb74a4ad5b512,2948 - Chart-diagrams-1.9.3@sha256:1535d5d0d3febca63138cecfde234315212611c21bb7f4358b2dae8c55c59003,1801 - statestack-0.3@sha256:be43ce2cd790a4732b88cdc9480458503cb5e307b4f79a502d99d5b3d417730e,1135 -- prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 - operational-0.2.4.0 # end of shake-bench dpendencies diff --git a/stack.yaml b/stack.yaml index 947620ba66..f38265d1f5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -46,7 +46,6 @@ extra-deps: - refinery-0.4.0.0@sha256:fe3a43add8ff1db5cfffee7e7694c86128b1dfe62c541f26e25a8eadf9585610,1663 - retrie-1.0.0.0@sha256:82014773115807f649f60fe4a3246911bbccd063a3c846cf5665e71f237bdd2d,4241 - stylish-haskell-0.12.2.0@sha256:38f7fd9ca30c9aad34f176dae4564576899e9c197b6b8557b59c5e8c6a622c74,6108 - - prettyprinter-1.7.1@sha256:9c43c9d8c3cd9f445596e5a2379574bba87f935a4d1fa41b5407ee3cf4edc743,6987 # Enable these when supported by all formatters # - ghc-lib-9.0.1.20210324@sha256:c8b9a2541ea3424c8d0e4f80584477d0f35be03f4a47d931152042d5f446c5fc,19279 From f39b61ee64499e452b6e0a17c2ca3a3819a3dcfb Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Tue, 23 Nov 2021 09:46:05 +0000 Subject: [PATCH 2/3] bump ghcide version number --- ghcide/ghcide.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 609bb77611..b1d84ecf9f 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -2,7 +2,7 @@ cabal-version: 2.4 build-type: Simple category: Development name: ghcide -version: 1.5.0 +version: 1.5.0.1 license: Apache-2.0 license-file: LICENSE author: Digital Asset and Ghcide contributors From 075b232a1f9a7eb00f3e08655de79613aa47ba06 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Tue, 23 Nov 2021 09:46:38 +0000 Subject: [PATCH 3/3] bump wingman version number --- plugins/hls-tactics-plugin/hls-tactics-plugin.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal index e2cbea5944..d4a00bb96f 100644 --- a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal +++ b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal @@ -1,7 +1,7 @@ cabal-version: 2.4 category: Development name: hls-tactics-plugin -version: 1.5.0.0 +version: 1.5.0.1 synopsis: Wingman plugin for Haskell Language Server description: Please see the README on GitHub at