Skip to content

Commit 4ffdf45

Browse files
georgefstmichaelpjjneiraAilrun
authored
Bump Ormolu and Fourmolu to GHC-9.2-compatible versions (#2579)
* Bump Ormolu and Fourmolu to latest versions (resp. 0.4 and 0.5) * Enable Ormolu and Fourmolu on GHC 9.2 * Bump index-state * enable tests for ghc-9.2.1 * enable fourmolu and ormolu * Allow newer ghc-lib-parser for *molu * Fix ormolu Co-authored-by: Michael Peyton Jones <[email protected]> Co-authored-by: Javier Neira <[email protected]> Co-authored-by: Junyoung "Clare" Jang <[email protected]>
1 parent 18a8996 commit 4ffdf45

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

Diff for: .github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ jobs:
178178
name: Test hls-stylish-haskell-plugin
179179
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
180180

181-
- if: matrix.test && matrix.ghc != '9.2.1'
181+
- if: matrix.test
182182
name: Test hls-ormolu-plugin
183183
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"
184184

185-
- if: matrix.test && matrix.ghc != '9.2.1'
185+
- if: matrix.test
186186
name: Test hls-fourmolu-plugin
187187
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
188188

Diff for: cabal-ghc901.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ package *
3737

3838
write-ghc-environment-files: never
3939

40-
index-state: 2021-12-29T12:30:08Z
40+
index-state: 2022-01-10T17:57:05Z
4141

4242
constraints:
4343
-- These plugins don't work on GHC9 yet

Diff for: cabal-ghc921.project

+5-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ packages:
99
-- ./plugins/hls-tactics-plugin
1010
-- ./plugins/hls-brittany-plugin
1111
-- ./plugins/hls-stylish-haskell-plugin
12-
-- ./plugins/hls-fourmolu-plugin
12+
./plugins/hls-fourmolu-plugin
1313
./plugins/hls-class-plugin
1414
-- ./plugins/hls-eval-plugin
1515
./plugins/hls-explicit-imports-plugin
@@ -23,7 +23,7 @@ packages:
2323
-- ./plugins/hls-floskell-plugin
2424
./plugins/hls-pragmas-plugin
2525
./plugins/hls-module-name-plugin
26-
-- ./plugins/hls-ormolu-plugin
26+
./plugins/hls-ormolu-plugin
2727
./plugins/hls-call-hierarchy-plugin
2828
-- ./plugins/hls-alternate-number-format-plugin
2929

@@ -54,7 +54,8 @@ package *
5454

5555
write-ghc-environment-files: never
5656

57-
index-state: 2022-01-03T18:45:00Z
57+
58+
index-state: 2022-01-10T17:57:05Z
5859

5960
constraints:
6061
-- These plugins don't build/work on GHC92 yet
@@ -66,11 +67,9 @@ constraints:
6667
-class
6768
-eval
6869
-floskell
69-
-fourmolu
7070
-haddockComments
7171
-hlint
7272
-moduleName
73-
-ormolu
7473
-qualifyImportedNames
7574
-refineImports
7675
-retrie
@@ -112,7 +111,7 @@ allow-newer:
112111
SVGFonts:diagrams-core,
113112

114113
-- for head.hackage
115-
primitive-unlifted:base
114+
primitive-unlifted:base,
116115

117116
allow-older:
118117
primitive-extras:primitive-unlifted

Diff for: cabal.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ package *
4040

4141
write-ghc-environment-files: never
4242

43-
index-state: 2021-12-29T12:30:08Z
43+
index-state: 2022-01-10T17:57:05Z
4444

4545
constraints:
4646
hyphenation +embed

Diff for: haskell-language-server.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ common floskell
288288
cpp-options: -Dfloskell
289289

290290
common fourmolu
291-
if flag(fourmolu) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
291+
if flag(fourmolu) && flag(ignore-plugins-ghc-bounds)
292292
build-depends: hls-fourmolu-plugin ^>=1.0.0.0
293293
cpp-options: -Dfourmolu
294294

@@ -475,7 +475,7 @@ test-suite func-test
475475
-- formatters
476476
if flag(floskell) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
477477
cpp-options: -Dfloskell
478-
if flag(fourmolu) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
478+
if flag(fourmolu) && flag(ignore-plugins-ghc-bounds)
479479
cpp-options: -Dfourmolu
480480
if flag(ormolu)
481481
cpp-options: -Dormolu

Diff for: plugins/hls-fourmolu-plugin/hls-fourmolu-plugin.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ library
2323
build-depends:
2424
, base >=4.12 && <5
2525
, filepath
26-
, fourmolu ^>=0.3 || ^>=0.4
26+
, fourmolu ^>=0.3 || ^>=0.4 || ^>= 0.5
2727
, ghc
2828
, ghc-boot-th
2929
, ghcide ^>=1.5.0

Diff for: plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library
2828
, hls-plugin-api >=1.1 && <1.3
2929
, lens
3030
, lsp
31-
, ormolu ^>=0.1.2 || ^>= 0.2 || ^>= 0.3
31+
, ormolu ^>=0.1.2 || ^>= 0.2 || ^>= 0.3 || ^>= 0.4
3232
, text
3333

3434
default-language: Haskell2010

0 commit comments

Comments
 (0)