From 29c0836c7de717d2627fbb449786ce7cb32093f5 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 18 Mar 2022 09:26:25 +0100 Subject: [PATCH 1/8] Target GHC 9.2.2 --- .circleci/config.yml | 6 +++--- .github/workflows/caching.yml | 2 +- .github/workflows/flags.yml | 4 ++-- .github/workflows/test.yml | 20 +++++++++---------- .gitlab-ci.yml | 2 +- bindist/ghcs | 2 +- cabal-ghc921.project => cabal-ghc92.project | 2 +- .../Development/IDE/GHC/Compat/Outputable.hs | 2 +- haskell-language-server.cabal | 2 +- .../test/Main.hs | 2 +- stack-9.2.1.yaml => stack-9.2.yaml | 2 +- 11 files changed, 23 insertions(+), 23 deletions(-) rename cabal-ghc921.project => cabal-ghc92.project (99%) rename stack-9.2.1.yaml => stack-9.2.yaml (99%) diff --git a/.circleci/config.yml b/.circleci/config.yml index b0f465db57..a965105e80 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,9 +105,9 @@ 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" + - STACK_FILE: "stack-9.2.yaml" <<: *defaults ghc-default: @@ -126,5 +126,5 @@ workflows: - ghc-8.10.7 - ghc-9.0.1 - ghc-9.0.2 - - ghc-9.2.1 + - ghc-9.2.2 - ghc-default diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 65ac74bf93..0dabe1ead8 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -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" diff --git a/.github/workflows/flags.yml b/.github/workflows/flags.yml index 8a94f12311..b914ba3b08 100644 --- a/.github/workflows/flags.yml +++ b/.github/workflows/flags.yml @@ -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" @@ -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" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 797d872d67..bd3d6bfc96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" @@ -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' @@ -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' @@ -159,7 +159,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" @@ -175,19 +175,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" @@ -199,7 +199,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" @@ -219,7 +219,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" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fe44a866e..6255af69ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/bindist/ghcs b/bindist/ghcs index f61eef13e6..c230e6d25e 100644 --- a/bindist/ghcs +++ b/bindist/ghcs @@ -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 diff --git a/cabal-ghc921.project b/cabal-ghc92.project similarity index 99% rename from cabal-ghc921.project rename to cabal-ghc92.project index b0e9ecad8a..6994e18219 100644 --- a/cabal-ghc921.project +++ b/cabal-ghc92.project @@ -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 tests: true diff --git a/ghcide/src/Development/IDE/GHC/Compat/Outputable.hs b/ghcide/src/Development/IDE/GHC/Compat/Outputable.hs index e3a4ecabe2..57f3cc368c 100644 --- a/ghcide/src/Development/IDE/GHC/Compat/Outputable.hs +++ b/ghcide/src/Development/IDE/GHC/Compat/Outputable.hs @@ -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 diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 23b67b1ee1..c6e554db3c 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -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 diff --git a/plugins/hls-change-type-signature-plugin/test/Main.hs b/plugins/hls-change-type-signature-plugin/test/Main.hs index d3f3b72a5c..e04a0d4944 100644 --- a/plugins/hls-change-type-signature-plugin/test/Main.hs +++ b/plugins/hls-change-type-signature-plugin/test/Main.hs @@ -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 diff --git a/stack-9.2.1.yaml b/stack-9.2.yaml similarity index 99% rename from stack-9.2.1.yaml rename to stack-9.2.yaml index 0962522f7e..6107765683 100644 --- a/stack-9.2.1.yaml +++ b/stack-9.2.yaml @@ -1,5 +1,5 @@ resolver: nightly-2022-01-14 -compiler: ghc-9.2.1 +compiler: ghc-9.2 packages: - . From 0143e5dd1ef1e9a463dbb9543b75edd915092262 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 18 Mar 2022 09:33:31 +0100 Subject: [PATCH 2/8] fix with-compiler --- cabal-ghc92.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal-ghc92.project b/cabal-ghc92.project index 6994e18219..0bcf835755 100644 --- a/cabal-ghc92.project +++ b/cabal-ghc92.project @@ -29,7 +29,7 @@ packages: ./plugins/hls-selection-range-plugin ./plugins/hls-change-type-signature-plugin -with-compiler: ghc-9.2 +with-compiler: ghc-9.2.2 tests: true From d05ef952e9e4793bf949ef6cbcbc0dfdcb18955c Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 19 Mar 2022 10:20:01 +0100 Subject: [PATCH 3/8] attempt to fix Mac build --- .github/workflows/caching.yml | 3 +++ .github/workflows/test.yml | 3 +++ .gitlab-ci.yml | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/caching.yml b/.github/workflows/caching.yml index 0dabe1ead8..3ae34145d8 100644 --- a/.github/workflows/caching.yml +++ b/.github/workflows/caching.yml @@ -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) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd3d6bfc96..0d93c774f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,6 +116,9 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build run: cabal build || cabal build || cabal build + 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 - name: Set test options # run the tests without parallelism, otherwise tasty will attempt to run diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6255af69ff..54941d616f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 @@ -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 @@ -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 @@ -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 From ae91eafc72ba4d8bfa2ffcf22de6395fd43d1536 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 19 Mar 2022 12:00:59 +0100 Subject: [PATCH 4/8] attempt to fix stack --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a965105e80..667700a982 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,6 +107,8 @@ jobs: ghc-9.2.2: environment: + # https://github.com/digital-asset/ghc-lib/issues/352 + - CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH" - STACK_FILE: "stack-9.2.yaml" <<: *defaults From fa854d666f663eaf1562389a33e569c584f3bceb Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 19 Mar 2022 13:30:49 +0100 Subject: [PATCH 5/8] Apply @July541 suggestion --- stack-9.2.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stack-9.2.yaml b/stack-9.2.yaml index 6107765683..36efddfd62 100644 --- a/stack-9.2.yaml +++ b/stack-9.2.yaml @@ -1,5 +1,5 @@ resolver: nightly-2022-01-14 -compiler: ghc-9.2 +compiler: ghc-9.2.2 packages: - . @@ -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 @@ -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 From ef356bb0bf75751a5e2ed11bf2aa10f8f4f325c3 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 20 Mar 2022 22:42:22 +0100 Subject: [PATCH 6/8] add missing space --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d93c774f2..25947e33fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -118,7 +118,7 @@ jobs: run: cabal build || cabal build || cabal build 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 + CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi":$CPATH - name: Set test options # run the tests without parallelism, otherwise tasty will attempt to run From 21c090e5c0a3d0f7a319c6ccecda962fd9d20896 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Mon, 21 Mar 2022 08:14:43 +0100 Subject: [PATCH 7/8] fix yaml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25947e33fe..435ac735ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,8 +116,8 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build run: cabal build || cabal build || cabal build + # needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352 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 - name: Set test options From 8fc19288b49b295dd7a2190b1be5e984c182562a Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Mon, 21 Mar 2022 11:31:19 +0100 Subject: [PATCH 8/8] another yaml fix --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 435ac735ec..26466c49ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -115,10 +115,10 @@ jobs: # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build - run: cabal build || cabal build || cabal 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 + CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH" + run: cabal build || cabal build || cabal build - name: Set test options # run the tests without parallelism, otherwise tasty will attempt to run