Skip to content

Delete the Brittany plugin #3441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/hackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
package: ["hie-compat", "hls-graph", "shake-bench",
"hls-plugin-api", "ghcide", "hls-test-utils",
"hls-cabal-plugin",
"hls-brittany-plugin", "hls-floskell-plugin", "hls-fourmolu-plugin",
"hls-floskell-plugin", "hls-fourmolu-plugin",
"hls-ormolu-plugin", "hls-stylish-haskell-plugin",
"hls-class-plugin", "hls-eval-plugin", "hls-explicit-imports-plugin",
"hls-haddock-comments-plugin", "hls-hlint-plugin", "hls-stan-plugin",
Expand Down Expand Up @@ -106,14 +106,11 @@ jobs:
# These tweaks are already in cabal-901.project but we dont want to use the entire file,
# Only the tricks needed by the solver which we know will not make the hackage build fail.
# The solver takes in account all project packages, even if they are not gonna be effectively built
# (like brittany or stylish-haskell for ghc-9.0)
# (like stylish-haskell for ghc-9.0)
- name: "Add temporary needed allow-newer for ghc-9.0"
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0.2'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
# For brittany
echo "allow-newer:" >> cabal.project
echo " butcher:base, multistate:base, data-tree-print:base," >> cabal.project
# For stylish-haskell
echo " stylish-haskell:Cabal,stylish-haskell:ghc-lib-parser,stylish-haskell:aeson" >> cabal.project

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ jobs:
HLS_WRAPPER_TEST_EXE: hls-wrapper
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"

- if: matrix.test && matrix.ghc != '9.2.4' && matrix.ghc != '9.2.5' && matrix.ghc != '9.4.2' && matrix.ghc != '9.4.3'
name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refactor-plugin --test-options="$TEST_OPTS"
Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

# Plugins
/plugins/hls-alternate-number-format-plugin @drsooch
/plugins/hls-brittany-plugin @fendor
/plugins/hls-cabal-plugin @fendor
/plugins/hls-cabal-fmt-plugin @VeryMilkyJoe @fendor
/plugins/hls-call-hierarchy-plugin @July541
Expand Down
1 change: 0 additions & 1 deletion bench/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ configurations:
- rename
- stylish-haskell
# - alternateNumberFormat
# # - brittany
# - callHierarchy
# - changeTypeSignature
# - class
Expand Down
1 change: 0 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ packages:
./plugins/hls-cabal-plugin
./plugins/hls-cabal-fmt-plugin
./plugins/hls-tactics-plugin
./plugins/hls-brittany-plugin
./plugins/hls-stylish-haskell-plugin
./plugins/hls-fourmolu-plugin
./plugins/hls-class-plugin
Expand Down
4 changes: 2 additions & 2 deletions configuration-ghc-90.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, inputs }:

let
disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ];
disabledPlugins = [ "hls-stylish-haskell-plugin" ];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
Expand Down Expand Up @@ -34,7 +34,7 @@ let
# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ])
(pkgs.lib.concatStringsSep " " [ "-f-stylishhaskell" ])
{ };

retrie = hself.retrie_1_1_0_0;
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This option obviously would not make sense for language servers for other langua

Here is a list of the additional settings currently supported by `haskell-language-server`, along with their setting key (you may not need to know this) and default:

- Formatting provider (`haskell.formattingProvider`, default `ormolu`): what formatter to use; one of `floskell`, `ormolu`, `fourmolu`, `stylish-haskell`, or `brittany` (if compiled with the brittany plugin).
- Formatting provider (`haskell.formattingProvider`, default `ormolu`): what formatter to use; one of `floskell`, `ormolu`, `fourmolu`, or `stylish-haskell`.
- Max completions (`haskell.maxCompletions`, default 40): maximum number of completions sent to the LSP client.
- Check project (`haskell.checkProject`, default true): whether to typecheck the entire project on initial load. As it is activated by default could drive to bad performance in large projects.
- Check parents (`haskell.checkParents`, default `CheckOnSave`): when to typecheck reverse dependencies of a file; one of `NeverCheck`, `CheckOnSave` (means dependent/parent modules will only be checked when you save), or `AlwaysCheck` (means re-typechecking them on every change).
Expand Down
3 changes: 1 addition & 2 deletions docs/contributing/plugin-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The HLS codebase includes several plugins under the namespace `Ide.Plugin.*`, th

- The ghcide plugin, which embeds ghcide as a plugin (ghcide is also the engine under HLS).
- The example and example2 plugins, offering a dubious welcome to new contributors
- The Brittany, ormolu, fourmolu, floskell and stylish-haskell plugins, a testament to the code formatting wars of our community.
- The ormolu, fourmolu, floskell and stylish-haskell plugins, a testament to the code formatting wars of our community.
- The eval plugin, a code lens provider to evaluate code in comments
- The retrie plugin, a code actions provider to execute retrie commands

Expand All @@ -96,7 +96,6 @@ idePlugins = pluginDescToIdePlugins allPlugins
, Ormolu.descriptor "ormolu"
, StylishHaskell.descriptor "stylish-haskell"
, Retrie.descriptor "retrie"
, Brittany.descriptor "brittany"
, Eval.descriptor "eval"
]
```
Expand Down
1 change: 0 additions & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ Format your code with various Haskell code formatters.

| Formatter | Provided by |
| --------------- | ---------------------------- |
| Brittany | `hls-brittany-plugin` |
| Floskell | `hls-floskell-plugin` |
| Fourmolu | `hls-fourmolu-plugin` |
| Ormolu | `hls-ormolu-plugin` |
Expand Down
1 change: 0 additions & 1 deletion docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-refine-imports-plugin` | 2 | |
| `hls-stylish-haskell-plugin` | 2 | 9.4 |
| `hls-tactics-plugin` | 2 | 9.2, 9.4 |
| `hls-brittany-plugin` | 3 | 9.2, 9.4 |
| `hls-haddock-comments-plugin` | 3 | 9.2, 9.4 |
| `hls-stan-plugin` | 3 | 8.6, 9.0, 9.2, 9.4 |
| `hls-retrie-plugin` | 3 | |
Expand Down
4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
url = "https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz";
flake = false;
};
brittany-01312 = {
url = "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz";
flake = false;
};
fourmolu = {
url = "https://hackage.haskell.org/package/fourmolu-0.10.1.0/fourmolu-0.10.1.0.tar.gz";
flake = false;
Expand Down
11 changes: 0 additions & 11 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ flag stylishHaskell
default: True
manual: True

flag brittany
description: Enable brittany plugin
default: True
manual: True

flag refactor
description: Enable refactor plugin
default: True
Expand Down Expand Up @@ -353,11 +348,6 @@ common stylishHaskell
build-depends: hls-stylish-haskell-plugin ^>= 1.0
cpp-options: -Dhls_stylishHaskell

common brittany
if flag(brittany) && (impl(ghc < 9.0.2) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-brittany-plugin ^>= 1.1
cpp-options: -Dhls_brittany

common refactor
if flag(refactor)
build-depends: hls-refactor-plugin ^>= 1.1
Expand Down Expand Up @@ -396,7 +386,6 @@ library
, fourmolu
, ormolu
, stylishHaskell
, brittany
, refactor

exposed-modules:
Expand Down
5 changes: 2 additions & 3 deletions hls-plugin-api/src/Ide/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import System.Posix.Signals
#endif
import Control.Applicative ((<|>))
import Control.Arrow ((&&&))
import Control.Lens ((^.), (.~))
import Control.Lens ((.~), (^.))
import Data.Aeson hiding (defaultOptions)
import Data.Default
import Data.Dependent.Map (DMap)
Expand Down Expand Up @@ -89,7 +89,6 @@ import Language.LSP.Types hiding
SemanticTokensEdit (_start))
import Language.LSP.Types.Capabilities (ClientCapabilities (ClientCapabilities),
TextDocumentClientCapabilities (_codeAction, _documentSymbol))
import qualified Language.LSP.Types.Lens as J
import Language.LSP.Types.Lens as J (HasChildren (children),
HasCommand (command),
HasContents (contents),
Expand All @@ -102,6 +101,7 @@ import Language.LSP.Types.Lens as J (HasChildren (children),
HasTextDocument (..),
HasTitle (title),
HasUri (..))
import qualified Language.LSP.Types.Lens as J
import Language.LSP.VFS
import Numeric.Natural
import OpenTelemetry.Eventlog
Expand Down Expand Up @@ -196,7 +196,6 @@ instance Default Config where
def = Config
{ checkParents = CheckOnSave
, checkProject = True
-- , formattingProvider = "brittany"
, formattingProvider = "ormolu"
-- , formattingProvider = "floskell"
-- , formattingProvider = "stylish-haskell"
Expand Down
Loading