Skip to content

Target GHC 9.2.2 #2787

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 11 commits into from
Mar 21, 2022
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
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ jobs:
- STACK_FILE: "stack-9.0.2.yaml"
<<: *defaults

ghc-9.2.1:
ghc-9.2.2:
environment:
- STACK_FILE: "stack-9.2.1.yaml"
# https://github.com/digital-asset/ghc-lib/issues/352
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, apparently I did notice, but this wasn't fixed. It appears to be broken to this day. @pepeiborra do you remember what you did here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've noticed this and #2936 is attempting to fix it up.

- STACK_FILE: "stack-9.2.yaml"
<<: *defaults

ghc-default:
Expand All @@ -126,5 +128,5 @@ workflows:
- ghc-8.10.7
- ghc-9.0.1
- ghc-9.0.2
- ghc-9.2.1
- ghc-9.2.2
- ghc-default
5 changes: 4 additions & 1 deletion .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ "9.2.1"
ghc: [ "9.2.2"
, "9.0.2"
, "9.0.1"
, "8.10.7"
Expand Down Expand Up @@ -116,6 +116,9 @@ jobs:
run: |
# repeating builds to workaround segfaults in windows and ghc-8.8.4
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
env:
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
CPATH:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi":$CPATH

# We build ghcide with benchs and test enabled to include its dependencies in the cache
# (including shake-bench)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.2.1"
ghc: [ "9.2.2"
, "9.0.2"
, "8.10.7"
, "8.8.4"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe"

# we have to clean up warnings for 9.0 and 9.2 before enable -WAll
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.1'
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.2'
name: Build with pedantic (-WError)
run: cabal v2-build --flags="pedantic"

Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.2.1"
ghc: [ "9.2.2"
, "9.0.2"
, "9.0.1"
, "8.10.7"
Expand All @@ -71,7 +71,7 @@ jobs:
include:
# only test supported ghc major versions
- os: ubuntu-latest
ghc: '9.2.1'
ghc: '9.2.2'
test: true
- os: ubuntu-latest
ghc: '9.0.2'
Expand All @@ -86,7 +86,7 @@ jobs:
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '9.2.1'
ghc: '9.2.2'
test: true
- os: windows-latest
ghc: '9.0.2'
Expand Down Expand Up @@ -115,6 +115,9 @@ jobs:

# repeating builds to workaround segfaults in windows and ghc-8.8.4
- name: Build
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
env:
CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
run: cabal build || cabal build || cabal build

- name: Set test options
Expand Down Expand Up @@ -159,7 +162,7 @@ jobs:
HLS_WRAPPER_TEST_EXE: hls-wrapper
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.2.1'
- if: matrix.test && matrix.ghc != '9.2.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 All @@ -175,19 +178,19 @@ jobs:
name: Test hls-pragmas-plugin
run: cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.1'
- if: matrix.test && matrix.ghc != '9.2.2'
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.1'
- if: matrix.test && matrix.ghc != '9.2.2'
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.1'
- if: matrix.test && matrix.ghc != '9.2.2'
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' && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.1'
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.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 @@ -199,7 +202,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.2.1'
- if: matrix.test && matrix.ghc != '9.2.2'
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 All @@ -219,7 +222,7 @@ jobs:
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2.1'
- if: matrix.test && matrix.ghc != '9.2.2'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS"

Expand Down
8 changes: 7 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variables:
CABAL_PROJECT: cabal.project
- GHC_VERSION: 9.0.2
CABAL_PROJECT: cabal-ghc90.project
- GHC_VERSION: 9.2.1
- GHC_VERSION: 9.2.2
CABAL_PROJECT: cabal-ghc921.project

workflow:
Expand Down Expand Up @@ -419,8 +419,10 @@ build-x86_64-darwin:
ADD_CABAL_ARGS: ""
before_script:
- /bin/bash ./.gitlab/brew.sh autoconf automake coreutils make tree
# CPATH https://github.com/digital-asset/ghc-lib/issues/352
script: |
export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
/bin/bash ./.gitlab/ci.sh
after_script:
- rm -Rf /private/tmp/.brew_tmp
Expand Down Expand Up @@ -469,6 +471,7 @@ build-aarch64-darwin:
- export HOMEBREW_CHANGE_ARCH_TO_ARM=1
- arch -arm64 /bin/bash ./.gitlab/brew.sh llvm autoconf automake coreutils make tree
# C_INCLUDE_PATH: https://gitlab.haskell.org/ghc/ghc/-/issues/20592
# CPATH https://github.com/digital-asset/ghc-lib/issues/352
script: |
export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
export CC=$CI_PROJECT_DIR/.brew/opt/llvm/bin/clang
Expand All @@ -477,6 +480,7 @@ build-aarch64-darwin:
export AR=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ar
export RANLIB=$CI_PROJECT_DIR/.brew/opt/llvm/bin/llvm-ranlib
export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
arch -arm64 /bin/bash ./.gitlab/ci.sh
after_script:
- rm -Rf /private/tmp/.brew_tmp
Expand Down Expand Up @@ -505,9 +509,11 @@ test-aarch64-darwin:
- export HOMEBREW_CHANGE_ARCH_TO_ARM=1
- arch -arm64 /bin/bash ./.gitlab/brew.sh make tree
# C_INCLUDE_PATH: https://gitlab.haskell.org/ghc/ghc/-/issues/20592
# CPATH https://github.com/digital-asset/ghc-lib/issues/352
script: |
export PATH="$CI_PROJECT_DIR/.brew/opt/llvm/bin:$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
export C_INCLUDE_PATH="`xcrun --show-sdk-path`/usr/include/ffi"
export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
arch -arm64 /bin/bash ./.gitlab/test.sh
after_script:
- rm -Rf /private/tmp/.brew_tmp
Expand Down
2 changes: 1 addition & 1 deletion bindist/ghcs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
8.10.7,cabal.project
9.0.2,cabal-ghc90.project
9.2.1,cabal-ghc921.project
9.2.1,cabal-ghc92.project
2 changes: 1 addition & 1 deletion cabal-ghc921.project → cabal-ghc92.project
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ packages:
./plugins/hls-selection-range-plugin
./plugins/hls-change-type-signature-plugin

with-compiler: ghc-9.2.1
with-compiler: ghc-9.2.2

tests: true

Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/GHC/Compat/Outputable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type PsError = ErrMsg
mkPrintUnqualifiedDefault :: HscEnv -> GlobalRdrEnv -> PrintUnqualified
mkPrintUnqualifiedDefault env =
#if MIN_VERSION_ghc(9,2,0)
-- GHC 9.2.1 version
-- GHC 9.2 version
-- mkPrintUnqualified :: UnitEnv -> GlobalRdrEnv -> PrintUnqualified
mkPrintUnqualified (hsc_unit_env env)
#else
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 || == 9.0.2 || == 9.2.1
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.2 || == 9.2.2
extra-source-files:
README.md
ChangeLog.md
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-change-type-signature-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ testRegexTwo = testGroup "Regex Two" [
where
regex = errorMessageRegexes !! 1

-- test ghc-9.2.1 error message regex
-- test ghc-9.2 error message regex
testRegex921One :: TestTree
testRegex921One = testGroup "Regex One" [
regexTest "ghc921-error1.txt" regex True
Expand Down
7 changes: 3 additions & 4 deletions stack-9.2.1.yaml → stack-9.2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resolver: nightly-2022-01-14
compiler: ghc-9.2.1
compiler: ghc-9.2.2

packages:
- .
Expand Down Expand Up @@ -46,8 +46,8 @@ extra-deps:
- floskell-0.10.6
- fourmolu-0.5.0.0
- ghc-exactprint-1.4.1
- ghc-lib-9.2.1.20220109
- ghc-lib-parser-9.2.1.20220109
- ghc-lib-9.2.2.20220307
- ghc-lib-parser-9.2.2.20220307
- ghc-lib-parser-ex-9.2.0.1
- heapsize-0.3.0.1
- hiedb-0.4.1.0
Expand Down Expand Up @@ -89,7 +89,6 @@ extra-deps:
# boot libraries
- Cabal-3.6.0.0
- directory-1.3.6.2
- ghc-boot-9.2.1
- process-1.6.13.2
- time-1.11.1.1
- unix-2.7.2.2
Expand Down