Skip to content

Commit

Permalink
Merge branch 'master' into use-flag-no-show-error-context
Browse files Browse the repository at this point in the history
* master: (36 commits)
  Migrate indexHieFile progress notification to ProgressReporting API (haskell#4205)
  Remove final allow-newer for 9.10 (haskell#4329)
  Remove unused exactprint dep
  More stylish
  Use newer cabal-fmt, partially lift ghc version restriction
  stylish
  Cleanup CI configs and cabal files
  More no-op code cleanup
  Remove no-longer-needed compat code, remove unused stuff
  Remove pre-multi component junk for GHC <= 9.2
  Fix stylish
  Fix a few things
  Remove from CI
  Update docs
  Fix loss of 9.2 GHC version
  More CPP
  WIP evaluate CPP
  Prepare release 2.9.0.0 (haskell#4319)
  Add completion for import fields in cabal files (haskell#4305)
  Refine GHC deprecation policy (haskell#3438)
  ...
  • Loading branch information
dsaenztagarro committed Jun 26, 2024
2 parents fa8b718 + f523690 commit 177d306
Show file tree
Hide file tree
Showing 266 changed files with 3,112 additions and 3,542 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ defaults: &defaults

version: 2
jobs:
stackage-lts21:
stackage-lts22:
docker:
- image: haskell:9.4.8-slim-buster
- image: haskell:9.6.5-slim-buster
environment:
- STACK_FILE: "stack-lts21.yaml"
- STACK_FILE: "stack-lts22.yaml"
<<: *defaults

stackage-nightly:
docker:
- image: haskell:9.6.4-slim-buster
- image: haskell:9.8.2-slim-buster
environment:
- STACK_FILE: "stack.yaml"
<<: *defaults
Expand All @@ -76,5 +76,5 @@ workflows:
version: 2
multiple-ghcs:
jobs:
- stackage-lts21
- stackage-lts22
- stackage-nightly
2 changes: 1 addition & 1 deletion .github/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
export PATH="$HOME/.local/bin:$PATH"

export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_CABAL_VERSION="${CABAL_VER:-3.10.2.0}"
export BOOTSTRAP_HASKELL_CABAL_VERSION="${CABAL_VER:-3.10.3.0}"
export BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG=no
export BOOTSTRAP_HASKELL_INSTALL_NO_STACK=yes
export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1
Expand Down
21 changes: 17 additions & 4 deletions .github/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@ set -eux
. .github/scripts/env.sh
. .github/scripts/common.sh

test_package="bytestring-0.11.1.0"
test_module="Data/ByteString.hs"
test_package="text-2.1.1"
test_module="src/Data/Text.hs"

create_cradle() {
echo "cradle:" > hie.yaml
echo " cabal:" >> hie.yaml
}

# Tests and benchmarks can't be built on some GHC versions, such as GHC 9.10.1 on Windows.
# Disable these packages for now, building bytestring-0.12.1.0 works completely fine.
create_cabal_project() {
echo "packages: ./" > cabal.project
echo "" >> cabal.project
echo "tests: False" >> cabal.project
echo "benchmarks: False" >> cabal.project

echo "flags: -simdutf -pure-haskell" >> cabal.project
}

enter_test_package() {
local tmp_dir
tmp_dir=$(mktempdir)
Expand All @@ -38,7 +49,7 @@ test_all_hls() {
bin_noexe=${bin/.exe/}
if ! [[ "${bin_noexe}" =~ "haskell-language-server-wrapper" ]] && ! [[ "${bin_noexe}" =~ "~" ]] ; then
if ghcup install ghc --set "${bin_noexe/haskell-language-server-/}" ; then
"${hls}" typecheck "${test_module}" || fail "failed to typecheck with HLS for GHC ${bin_noexe/haskell-language-server-/}"
"${hls}" --debug typecheck "${test_module}" || fail "failed to typecheck with HLS for GHC ${bin_noexe/haskell-language-server-/}"

# After running the test, free up disk space by deleting the unneeded GHC version.
# Helps us staying beneath the 14GB SSD disk limit.
Expand All @@ -60,7 +71,7 @@ env

# ensure ghcup
install_ghcup
ghcup install ghc --set 9.4.5
ghcup install ghc --set 9.4.8

(cd .. && ecabal update) # run cabal update outside project dir

Expand All @@ -77,6 +88,7 @@ case "${TARBALL_EXT}" in

enter_test_package
create_cradle
create_cabal_project
test_all_hls "$GHCUP_BIN"

;;
Expand Down Expand Up @@ -106,6 +118,7 @@ case "${TARBALL_EXT}" in

enter_test_package
create_cradle
create_cabal_project
test_all_hls "$(ghcup whereis bindir)"

;;
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ jobs:
- ubuntu-latest
- macOS-latest
- windows-latest
exclude:
# We disable this this combo in test.yml due to long path issues, so we also need to disable it here
- os: windows-latest
ghc: "9.2"
steps:
- uses: actions/checkout@v3

Expand All @@ -105,7 +101,7 @@ jobs:
# Fetching from github cache is faster than doing it from hackage
# Sources does not change per ghc and ghc version son only doing it
# for one matrix job (it is arbitrary)
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2'
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.6'
name: Download sources
run: |
cabal $cabalBuild --only-download --enable-benchmarks --enable-tests
Expand All @@ -120,7 +116,7 @@ jobs:
# We build ghcide with benchs and test enabled to include its dependencies in the cache
# (including shake-bench)
# Only for the same ghc and os used in the bench workflow, so we save cache space
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2'
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.6'
name: Build ghcide benchmark
run: |
cabal $cabalBuild ghcide --enable-benchmarks --enable-tests
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: ./.github/actions/setup-build
with:
# select a stable GHC version
ghc: 9.2
ghc: 9.6
os: ${{ runner.os }}
shorten-hls: false

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.2", "9.6.5", "9.4.8", "9.2.8"]
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
platform: [ { image: "debian:9"
, installCmd: "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
Expand Down Expand Up @@ -118,25 +118,25 @@ jobs:
# Perhaps we can migrate *all* unknown linux builds to a uniform
# image.
include:
- ghc: 9.2.8
- ghc: 9.4.8
platform:
{ image: "rockylinux:8"
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
{ image: "fedora:27"
, installCmd: "dnf install -y"
, toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
, DISTRO: "Unknown"
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections"
}
- ghc: 9.4.8
- ghc: 9.6.5
platform:
{ image: "fedora:27"
, installCmd: "dnf install -y"
{ image: "rockylinux:8"
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
, toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
, DISTRO: "Unknown"
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections"
}
- ghc: 9.6.5
- ghc: 9.8.2
platform:
{ image: "rockylinux:8"
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
Expand All @@ -145,7 +145,7 @@ jobs:
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections"
}
- ghc: 9.8.2
- ghc: 9.10.1
platform:
{ image: "rockylinux:8"
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: ["9.8.2", "9.6.5", "9.4.8", "9.2.8" ]
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.2", "9.6.5", "9.4.8", "9.2.8"]
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.2", "9.6.5", "9.4.8", "9.2.8"]
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.2", "9.6.5", "9.4.8", "9.2.8"]
ghc: ["9.10.1", "9.8.2", "9.6.5", "9.4.8"]
steps:
- name: install windows deps
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supported-ghc-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[ "9.8", "9.6", "9.4" , "9.2" ]
["9.10", "9.8", "9.6", "9.4"]
27 changes: 15 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ jobs:
- true
- false
exclude:
# Don't do anything for windows on 9.2, it has particularly bad long-path issues
- os: windows-latest
ghc: "9.2"
# Exclude the test configuration on macos, it's sufficiently similar to other OSs
# that it mostly just burns CI time. Buiding is still useful since it catches
# solver issues.
Expand All @@ -98,7 +95,7 @@ jobs:
- uses: ./.github/actions/setup-build
with:
ghc: ${{ matrix.ghc }}
os: ${{ runner.os }}
os: ${{ runner.os }}

- name: Build
run: cabal build all
Expand Down Expand Up @@ -141,7 +138,8 @@ jobs:
name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin-tests || cabal test hls-refactor-plugin-tests

- if: matrix.test
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin-tests || cabal test hls-floskell-plugin-tests

Expand All @@ -157,15 +155,18 @@ jobs:
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin-tests || cabal test hls-eval-plugin-tests

- if: matrix.test
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin-tests || cabal test hls-splice-plugin-tests

- if: matrix.test && matrix.ghc != '9.2'
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-stan-plugin
run: cabal test hls-stan-plugin-tests || cabal test hls-stan-plugin-tests

- if: matrix.test
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin-tests || cabal test hls-stylish-haskell-plugin-tests

Expand All @@ -189,7 +190,8 @@ jobs:
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin-tests || cabal test hls-rename-plugin-tests

- if: matrix.test
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin-tests || cabal test hls-hlint-plugin-tests

Expand Down Expand Up @@ -225,8 +227,8 @@ jobs:
name: Test hls-explicit-record-fields-plugin test suite
run: cabal test hls-explicit-record-fields-plugin-tests || cabal test hls-explicit-record-fields-plugin-tests

## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
- if: matrix.test && matrix.ghc == '9.2'
# versions need to be limited since the tests depend on cabal-fmt which only builds with ghc <9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-cabal-fmt-plugin test suite
run: cabal test hls-cabal-fmt-plugin-tests --flag=isolateCabalfmtTests || cabal test hls-cabal-fmt-plugin-tests --flag=isolateCabalfmtTests

Expand All @@ -238,7 +240,8 @@ jobs:
name: Test hls-cabal-plugin test suite
run: cabal test hls-cabal-plugin-tests || cabal test hls-cabal-plugin-tests

- if: matrix.test
# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
name: Test hls-retrie-plugin test suite
run: cabal test hls-retrie-plugin-tests || cabal test hls-retrie-plugin-tests

Expand Down
Loading

0 comments on commit 177d306

Please sign in to comment.