Skip to content

Commit

Permalink
Add support for ghc-9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Jan 5, 2022
1 parent b956c3b commit 4caf4e1
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 28 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Expand Up @@ -100,6 +100,11 @@ jobs:
- STACK_FILE: "stack-9.0.1.yaml"
<<: *defaults

ghc-9.0.2:
environment:
- STACK_FILE: "stack-9.0.2.yaml"
<<: *defaults

ghc-default:
environment:
- STACK_FILE: "stack.yaml"
Expand All @@ -115,4 +120,5 @@ workflows:
- ghc-8.10.6
- ghc-8.10.7
- ghc-9.0.1
- ghc-9.0.2
- ghc-default
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Expand Up @@ -19,7 +19,8 @@ jobs:
fail-fast: false
matrix:
ghc:
[ "9.0.1"
[ "9.0.2"
, "9.0.1"
, '8.10.7'
, "8.10.6"
, "8.8.4"
Expand Down Expand Up @@ -53,9 +54,14 @@ jobs:
echo -e 'package blaze-textual\n flags: +integer-simple' >> cabal.project.local
fi
- name: (GHC 9.0) Use modified cabal.project for GHC 9.0
if: ${{ matrix.ghc == '9.0.1' }}
run: cp cabal-ghc901.project cabal.project
- name: Use modified cabal.project
env:
GHCVER: ${{ matrix.ghc }}
run: |
ALT_PROJECT_FILE=cabal-ghc${GHCVER//./}.project
if [[ -f "$ALT_PROJECT_FILE" ]]; then
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE" cabal.project
fi
- name: Shorten binary names
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/caching.yml
Expand Up @@ -76,7 +76,8 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ "9.0.1"
ghc: [ "9.0.2"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/hackage.yml
Expand Up @@ -34,18 +34,19 @@ jobs:
"hls-call-hierarchy-plugin", "hls-alternate-number-format-plugin",
"hls-qualify-imported-names-plugin",
"haskell-language-server"]
ghc: [ "9.0.1",
"8.10.7",
"8.8.4",
"8.6.5"]
ghc: [ "9.0.2"
, "8.10.7"
, "8.8.4"
, "8.6.5"
]
exclude:
- ghc: "9.0.1"
- ghc: "9.0.2"
package: "hls-brittany-plugin"
- ghc: "9.0.1"
- ghc: "9.0.2"
package: "hls-stylish-haskell-plugin"
- ghc: "9.0.1"
- ghc: "9.0.2"
package: "hls-class-plugin"
- ghc: "9.0.1"
- ghc: "9.0.2"
package: "hls-tactics-plugin"

steps:
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
echo "allow-newer: Chart-diagrams:diagrams-core, SVGFonts:diagrams-core," >> cabal.project
- name: "Add temporary needed allow-newer for ghc-9.0"
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0.1'
if: steps.get-hackage-version.outputs.exists != 'true' && (matrix.ghc == '9.0.1' || matrix.ghc == '9.0.2')
run: |
# TODO: remove when not needed
cd $(ls -d ./incoming/${{ matrix.package }}-*)
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -56,7 +56,8 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.0.1"
ghc: [ "9.0.2"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:

run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"

- if: matrix.test && matrix.ghc != '9.0.1'
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2'
name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || 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"

Expand Down Expand Up @@ -172,7 +173,7 @@ jobs:
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0.1'
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2'
name: Test hls-stylish-haskell-plugin
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"

Expand All @@ -184,7 +185,7 @@ jobs:
name: Test hls-fourmolu-plugin
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"

- if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"

Expand Down
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -18,6 +18,8 @@ variables:
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.0.1
CABAL_PROJECT: cabal-ghc901.project
- GHC_VERSION: 9.0.2
CABAL_PROJECT: cabal-ghc902.project

.m1_matrix: &m1_matrix
matrix:
Expand Down
77 changes: 77 additions & 0 deletions cabal-ghc902.project
@@ -0,0 +1,77 @@
packages:
./
./hie-compat
./shake-bench
./hls-graph
./ghcide
./hls-plugin-api
./hls-test-utils
./plugins/hls-tactics-plugin
./plugins/hls-brittany-plugin
./plugins/hls-stylish-haskell-plugin
./plugins/hls-fourmolu-plugin
./plugins/hls-class-plugin
./plugins/hls-eval-plugin
./plugins/hls-explicit-imports-plugin
./plugins/hls-refine-imports-plugin
./plugins/hls-hlint-plugin
./plugins/hls-rename-plugin
./plugins/hls-retrie-plugin
./plugins/hls-haddock-comments-plugin
./plugins/hls-splice-plugin
./plugins/hls-qualify-imported-names-plugin
./plugins/hls-floskell-plugin
./plugins/hls-pragmas-plugin
./plugins/hls-module-name-plugin
./plugins/hls-ormolu-plugin
./plugins/hls-call-hierarchy-plugin
./plugins/hls-alternate-number-format-plugin

source-repository-package
type: git
location: https://github.com/tfausak/unix-compat
tag: 154c3a63f154cb49c51d5f9d13488e8119631d8a
-- To fix windows build
-- https://github.com/jacobstanley/unix-compat/pull/47

with-compiler: ghc-9.0.2

tests: true

package *
ghc-options: -haddock
test-show-details: direct

write-ghc-environment-files: never

index-state: 2021-12-29T12:30:08Z

constraints:
-- These plugins don't work on GHC9 yet
haskell-language-server +ignore-plugins-ghc-bounds -brittany -stylishhaskell -tactic,
ghc-lib-parser ^>= 9.0

-- although we are not building all plugins cabal solver phase is run for all packages
-- this way we track explicitly all transitive dependencies which need support for ghc-9
allow-newer:
brittany:base,
brittany:ghc,
brittany:ghc-boot-th,
-- for brittany
butcher:base,
multistate:base,
data-tree-print:base,

stylish-haskell:Cabal,
stylish-haskell:ghc-lib-parser,

floskell:base,
floskell:ghc-prim,

-- for shake-bench
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core,

-- ghc-9.0.2 specific
hashable:ghc-bignum,
ghc-typelits-natnormalise:ghc-bignum
1 change: 1 addition & 0 deletions docs/supported-versions.md
Expand Up @@ -7,6 +7,7 @@ The current support for different GHC versions is given in the following table.
| GHC version | Last supporting HLS version | Deprecation status |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| 9.2.0 | [not supported](https://github.com/haskell/haskell-language-server/issues/2179) yet | |
| 9.0.2 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
| 9.0.1 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
| 8.10.7 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | |
| 8.10.6 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS and HLS full support for ghc-9.0 |
Expand Down
2 changes: 1 addition & 1 deletion ghcide/ghcide.cabal
Expand Up @@ -13,7 +13,7 @@ description:
A library for building Haskell IDE's on top of the GHC API.
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
bug-reports: https://github.com/haskell/haskell-language-server/issues
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1 || == 9.0.2
extra-source-files: README.md CHANGELOG.md
test/data/**/*.project
test/data/**/*.cabal
Expand Down
2 changes: 1 addition & 1 deletion ghcide/test/exe/Main.hs
Expand Up @@ -589,7 +589,7 @@ diagnosticTests = testGroup "diagnostics"
]
_ <- createDoc "Foo.hs" "haskell" fooContent
if ghcVersion >= GHC90 then
-- Haddock parse errors are ignored on ghc-9.0.1
-- Haddock parse errors are ignored on ghc-9.0
pure ()
else
expectDiagnostics
Expand Down
2 changes: 1 addition & 1 deletion haskell-language-server.cabal
Expand Up @@ -14,7 +14,7 @@ copyright: The Haskell IDE Team
license: Apache-2.0
license-file: LICENSE
build-type: Simple
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1 || == 9.0.2
extra-source-files:
README.md
ChangeLog.md
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-hlint-plugin/hls-hlint-plugin.cabal
Expand Up @@ -36,7 +36,7 @@ flag hlint33
manual: False
description:
Hlint-3.3 doesn't support versions ghc-lib < 9.0.1 nor ghc <= 8.6, so we can use hlint-3.2 for backwards compat
This flag can be removed when all dependencies support ghc-lib-9.0.1 and we drop support for ghc-8.6
This flag can be removed when all dependencies support ghc-lib-9.0.* and we drop support for ghc-8.6

library
exposed-modules: Ide.Plugin.Hlint
Expand Down
7 changes: 1 addition & 6 deletions stack-9.0.1.yaml
@@ -1,4 +1,4 @@
resolver: nightly-2021-12-14
resolver: nightly-2022-01-04

packages:
- .
Expand Down Expand Up @@ -32,22 +32,17 @@ packages:
extra-deps:
- bytestring-encoding-0.1.1.0
- dependent-map-0.4.0.0
- dependent-sum-0.7.1.0
- extra-1.7.9 # for ghcide, https://github.com/haskell/haskell-language-server/pull/2131
- hspec-2.7.10 # for hls-test-utils
- hspec-core-2.7.10 # for hls-test-utils
- some-1.0.2 # for dependent-sum, https://github.com/obsidiansystems/dependent-sum/issues/66
- dependent-sum-template-0.1.1.1
- floskell-0.10.6
- heapsize-0.3.0.1
- hiedb-0.4.1.0
- implicit-hie-0.1.2.6
- implicit-hie-cradle-0.3.0.5
- monad-dijkstra-0.1.1.3
- retrie-1.1.0.0
- lsp-1.4.0.0
- lsp-test-0.14.0.2
- lsp-types-1.4.0.0

# shake-bench dependencies
- Chart-1.9.3
Expand Down
97 changes: 97 additions & 0 deletions stack-9.0.2.yaml
@@ -0,0 +1,97 @@
resolver: nightly-2022-01-04
compiler: ghc-9.0.2

packages:
- .
- ./hie-compat
- ./hls-graph
- ./ghcide/
- ./hls-plugin-api
- ./hls-test-utils
- ./shake-bench
- ./plugins/hls-call-hierarchy-plugin
- ./plugins/hls-class-plugin
- ./plugins/hls-haddock-comments-plugin
- ./plugins/hls-eval-plugin
- ./plugins/hls-explicit-imports-plugin
- ./plugins/hls-qualify-imported-names-plugin
- ./plugins/hls-refine-imports-plugin
- ./plugins/hls-hlint-plugin
- ./plugins/hls-rename-plugin
- ./plugins/hls-retrie-plugin
- ./plugins/hls-splice-plugin
# - ./plugins/hls-tactics-plugin
# - ./plugins/hls-brittany-plugin
# - ./plugins/hls-stylish-haskell-plugin
- ./plugins/hls-floskell-plugin
- ./plugins/hls-fourmolu-plugin
- ./plugins/hls-pragmas-plugin
- ./plugins/hls-module-name-plugin
- ./plugins/hls-ormolu-plugin
- ./plugins/hls-alternate-number-format-plugin

extra-deps:
- bytestring-encoding-0.1.1.0
- dependent-map-0.4.0.0
- extra-1.7.9 # for ghcide, https://github.com/haskell/haskell-language-server/pull/2131
- hspec-2.7.10 # for hls-test-utils
- hspec-core-2.7.10 # for hls-test-utils
- some-1.0.2 # for dependent-sum, https://github.com/obsidiansystems/dependent-sum/issues/66
- floskell-0.10.6
- heapsize-0.3.0.1
- hiedb-0.4.1.0
- implicit-hie-0.1.2.6
- implicit-hie-cradle-0.3.0.5
- monad-dijkstra-0.1.1.3
- retrie-1.1.0.0

# shake-bench dependencies
- Chart-1.9.3
- Chart-diagrams-1.9.3
- SVGFonts-1.7.0.1 # for Chart-diagrams, https://github.com/timbod7/haskell-chart/issues/232
- diagrams-postscript-1.5
- statestack-0.3
- operational-0.2.4.1

# boot libraries
- Cabal-3.6.2.0
- directory-1.3.7.0
- ghc-boot-9.2.1
- process-1.6.13.2
- time-1.12.1

# currently needed for ghcide>extra, etc.
allow-newer: true

ghc-options:
"$everything": -haddock

configure-options:
ghcide:
- --disable-library-for-ghci
haskell-language-server:
- --disable-library-for-ghci
heapsize:
- --disable-library-for-ghci

flags:
haskell-language-server:
pedantic: true

ignore-plugins-ghc-bounds: true
tactic: false # Dependencies fail
stylishHaskell: false
brittany: false

retrie:
BuildExecutable: false
# Stack doesn't support automatic flags.
hls-hlint-plugin:
hlint33: true
hyphenation:
embed: true

nix:
packages: [ icu libcxx zlib ]

concurrent-tests: false

0 comments on commit 4caf4e1

Please sign in to comment.