Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for ghc 9.0.2 #2567

Merged
merged 50 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ddfede4
Extract out ci build setup
jneira Jan 4, 2022
b956c3b
Add required shell property
jneira Jan 4, 2022
4caf4e1
Add support for ghc-9.0.2
jneira Jan 5, 2022
bf280fa
Test ghc 9.0.2
jneira Jan 5, 2022
77ffca7
Add unix boot package
jneira Jan 10, 2022
87a8c9d
Use primitive-unlifted < 1.0
jneira Jan 10, 2022
81e8aab
Use primitive-unlifted < 1.0 for stack
jneira Jan 10, 2022
857edb9
Ude 9.0.1 for hackage
jneira Jan 11, 2022
23e6c82
Merge branch 'master' into ghc-9.0.2
jneira Jan 11, 2022
9421c63
Use a unified cabal-ghc90.project
jneira Jan 11, 2022
1d3acf3
Use last snapshot with ghc-9.0.2 support
jneira Jan 11, 2022
3acfcf4
Use new cabal-ghc90.project in build
jneira Jan 11, 2022
ad03a95
Add stm-containers
jneira Jan 11, 2022
eaaafdb
Add specific tweaks for ghc-9.0.2
jneira Jan 11, 2022
ec80d94
Use the las ghc-boot-9.0
jneira Jan 11, 2022
0664619
Merge branch 'master' into ghc-9.0.2
jneira Jan 12, 2022
9161fb8
Fix test adding allow-newer
jneira Jan 12, 2022
d7c63f8
Use unix-compat from hackage
jneira Jan 12, 2022
d58ea42
Merge branch 'master' into ghc-9.0.2
jneira Jan 13, 2022
e377956
Use unix-compat from hackage
jneira Jan 13, 2022
52a6a4d
Make consistent lastest stack.yamls
jneira Jan 13, 2022
c3b8a54
Clean up cabal.project
jneira Jan 13, 2022
75e234a
more cleanups
jneira Jan 13, 2022
d549a26
Update tweaks in hackage ci
jneira Jan 13, 2022
e3c41d9
Correct comment
jneira Jan 13, 2022
c5e1f4b
Merge branch 'master' into ghc-9.0.2
jneira Jan 13, 2022
51db994
Correct fourmolu condition
jneira Jan 13, 2022
eeb343d
Correct fourmolu condition in tests
jneira Jan 13, 2022
6a77064
Removing the all target from caching
jneira Jan 13, 2022
fba33f5
exclude Brittany 0.14.0.1
jneira Jan 13, 2022
0c89870
Merge remote-tracking branch 'upstream/master' into ghc-9.0.2
jneira Jan 14, 2022
5dcec89
Update snapshot to get new lsp
jneira Jan 14, 2022
b44f58b
document flag
jneira Jan 14, 2022
bfedf97
Document and build ghcide benchmark
jneira Jan 14, 2022
4e535c7
Doc and use ghc-9.0.2 in hackage
jneira Jan 14, 2022
2c7ac63
Add ghc-9.2.1 to tested-with
jneira Jan 14, 2022
d2f0216
Use 9.0.2 in gitlab
jneira Jan 14, 2022
d210d99
Use last *molus
jneira Jan 15, 2022
dd335b6
Use same versions as cabal build
jneira Jan 16, 2022
6326efe
Merge branch 'master' into ghc-9.0.2
jneira Jan 16, 2022
e27f56d
Use cabal freeze versions
jneira Jan 16, 2022
a5f5907
Merge branch 'ghc-9.0.2' of https://github.com/jneira/haskell-languag…
jneira Jan 16, 2022
e694ebb
Add dep for ghcide tests
jneira Jan 16, 2022
47e213c
one by one
jneira Jan 16, 2022
c1fc2ee
Merge branch 'master' into ghc-9.0.2
jneira Jan 16, 2022
f965d3c
Unnecessary change
jneira Jan 16, 2022
3e75867
Remove unnecessary flag
jneira Jan 16, 2022
3a8e61e
Corrections
jneira Jan 16, 2022
3980b6d
Move blocks
jneira Jan 16, 2022
6b8c707
Merge branch 'master' into ghc-9.0.2
mergify[bot] Jan 16, 2022
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
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
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
1 change: 1 addition & 0 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
run: |
echo "CABAL_PKGS_DIR=C:\\cabal\\packages" >> $GITHUB_ENV
shell: bash

- if: ( inputs.os == 'Linux' ) || ( inputs.os == 'macOS' )
name: (Linux,macOS) Platform config
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
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 All @@ -68,7 +69,7 @@ jobs:
include:
# only test supported ghc major versions
- os: ubuntu-latest
ghc: '9.0.1'
ghc: '9.0.2'
test: true
- os: ubuntu-latest
ghc: '8.10.7'
Expand All @@ -80,7 +81,7 @@ jobs:
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '9.0.1'
ghc: '9.0.2'
test: true
- os: windows-latest
ghc: '8.10.7'
Expand All @@ -89,6 +90,8 @@ jobs:
ghc: '8.6.5'
test: true
# only build rest of supported ghc versions for windows
- os: windows-latest
ghc: '9.0.1'
- os: windows-latest
ghc: '8.10.6'
- os: windows-latest
Expand Down Expand Up @@ -144,7 +147,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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder what would happen if we did this unconditionally but set the test suite to not be buildable on GHC 9 🤔 might error, might just succeed...

Copy link
Member Author

@jneira jneira Jan 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i think it is good to build it even if the tests are gonna fail, or it will rot even with compile errors.
We are building all the test suites (with tests: true) and cabal doesnt have runnable: false 😉

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fair.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative is mark them as ignored or broken for that hls version using tasty modifiers, but we are not using them that way for now

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 +175,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 +187,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Loading