Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into inlay-hints-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jetjinser committed Jun 21, 2024
2 parents 8d94c51 + f523690 commit 2e869db
Show file tree
Hide file tree
Showing 238 changed files with 2,506 additions and 3,149 deletions.
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
112 changes: 112 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,117 @@
# Changelog for haskell-language-server

## 2.9.0.0

- Bindists for GHC 9.10.1 by @wz1000, @jhrcek, @michaelpj
- More hls-graph reliability improvements by @soulomoon
- Refactoring of test suite runners by @soulomoon
- Fixes in multiple home units support by @wz1000

### Pull Requests

- Fix quadratic memory usage in GetLocatedImports
([#4318](https://github.com/haskell/haskell-language-server/pull/4318)) by @mpickering
- Bump stack configs + CI to 9.6.5 and 9.8.2
([#4316](https://github.com/haskell/haskell-language-server/pull/4316)) by @jhrcek
- Add support for Fourmolu 0.16
([#4314](https://github.com/haskell/haskell-language-server/pull/4314)) by @ brandonchinn178
- Code action to remove redundant record field import (fixes #4220)
([#4308](https://github.com/haskell/haskell-language-server/pull/4308)) by @battermann
- Use restricted monad for plugins (#4057)
([#4304](https://github.com/haskell/haskell-language-server/pull/4304)) by @awjchen
- 4301 we need to implement utility to wait for all runnning keys in hls graph done
([#4302](https://github.com/haskell/haskell-language-server/pull/4302)) by @soulomoon
- Call useWithStale instead of useWithStaleFast when calling ParseCabalFields
([#4294](https://github.com/haskell/haskell-language-server/pull/4294)) by @VeryMilkyJoe
- test: add test documenting #806
([#4292](https://github.com/haskell/haskell-language-server/pull/4292)) by @develop7
- ghcide: drop ghc-check and ghc-paths dependency
([#4291](https://github.com/haskell/haskell-language-server/pull/4291)) by @wz1000
- Limit number of valid hole fits to 10
([#4288](https://github.com/haskell/haskell-language-server/pull/4288)) by @akshaymankar
- Add common stanza to completion data
([#4286](https://github.com/haskell/haskell-language-server/pull/4286)) by @VeryMilkyJoe
- FindImports: ThisPkg means some home unit, not "this" unit
([#4284](https://github.com/haskell/haskell-language-server/pull/4284)) by @wz1000
- Remove redudant absolutization in session loader
([#4280](https://github.com/haskell/haskell-language-server/pull/4280)) by @soulomoon
- Bump to new lsp versions
([#4279](https://github.com/haskell/haskell-language-server/pull/4279)) by @michaelpj
- Put more test code into pre-commit
([#4275](https://github.com/haskell/haskell-language-server/pull/4275)) by @soulomoon
- Delete library ghcide test utils
([#4274](https://github.com/haskell/haskell-language-server/pull/4274)) by @soulomoon
- Delete testUtil from ghcide-tests
([#4272](https://github.com/haskell/haskell-language-server/pull/4272)) by @soulomoon
- CI change, only run bench on performance label
([#4271](https://github.com/haskell/haskell-language-server/pull/4271)) by @soulomoon
- Migrate WatchedFileTests
([#4269](https://github.com/haskell/haskell-language-server/pull/4269)) by @soulomoon
- Migrate UnitTests
([#4268](https://github.com/haskell/haskell-language-server/pull/4268)) by @soulomoon
- Migrate SafeTests
([#4267](https://github.com/haskell/haskell-language-server/pull/4267)) by @soulomoon
- Migrate SymlinkTests
([#4266](https://github.com/haskell/haskell-language-server/pull/4266)) by @soulomoon
- Remove unused and outdated CHANGELOG files
([#4264](https://github.com/haskell/haskell-language-server/pull/4264)) by @fendor
- Enable cabal flaky test
([#4263](https://github.com/haskell/haskell-language-server/pull/4263)) by @soulomoon
- Migrate RootUriTests
([#4261](https://github.com/haskell/haskell-language-server/pull/4261)) by @soulomoon
- Migrate PreprocessorTests
([#4260](https://github.com/haskell/haskell-language-server/pull/4260)) by @soulomoon
- Migrate PluginSimpleTests
([#4259](https://github.com/haskell/haskell-language-server/pull/4259)) by @soulomoon
- Migrate ClientSettingsTests
([#4258](https://github.com/haskell/haskell-language-server/pull/4258)) by @soulomoon
- Unify critical session running in hls
([#4256](https://github.com/haskell/haskell-language-server/pull/4256)) by @soulomoon
- Bump cachix/cachix-action from 14 to 15
([#4255](https://github.com/haskell/haskell-language-server/pull/4255)) by @dependabot[bot]
- Bump haskell-actions/setup from 2.7.2 to 2.7.3
([#4254](https://github.com/haskell/haskell-language-server/pull/4254)) by @dependabot[bot]
- Bump haskell-actions/setup from 2.7.2 to 2.7.3 in /.github/actions/setup-build
([#4253](https://github.com/haskell/haskell-language-server/pull/4253)) by @dependabot[bot]
- Shorter file names completion
([#4252](https://github.com/haskell/haskell-language-server/pull/4252)) by @VenInf
- Fix progress start delay
([#4249](https://github.com/haskell/haskell-language-server/pull/4249)) by @michaelpj
- Bump cachix/install-nix-action from 26 to 27
([#4245](https://github.com/haskell/haskell-language-server/pull/4245)) by @dependabot[bot]
- Bump haskell-actions/setup from 2.7.1 to 2.7.2
([#4244](https://github.com/haskell/haskell-language-server/pull/4244)) by @dependabot[bot]
- Bump haskell-actions/setup from 2.7.1 to 2.7.2 in /.github/actions/setup-build
([#4243](https://github.com/haskell/haskell-language-server/pull/4243)) by @dependabot[bot]
- Enable test for #717
([#4241](https://github.com/haskell/haskell-language-server/pull/4241)) by @soulomoon
- Remove Pepe from CODEOWNERS
([#4239](https://github.com/haskell/haskell-language-server/pull/4239)) by @michaelpj
- Fix resultBuilt(dirty mechanism) in hls-graph
([#4238](https://github.com/haskell/haskell-language-server/pull/4238)) by @soulomoon
- Support for 9.10
([#4233](https://github.com/haskell/haskell-language-server/pull/4233)) by @wz1000
- Refactor hls-test-util and reduce getCurrentDirectory after initilization
([#4231](https://github.com/haskell/haskell-language-server/pull/4231)) by @soulomoon
- [Migrate BootTests] part of #4173 Migrate ghcide tests to hls test utils
([#4227](https://github.com/haskell/haskell-language-server/pull/4227)) by @soulomoon
- Actually enable pedantic flag in ci flags job
([#4224](https://github.com/haskell/haskell-language-server/pull/4224)) by @jhrcek
- Cleanup cabal files, ghc compat code, fix ghc warnings
([#4222](https://github.com/haskell/haskell-language-server/pull/4222)) by @jhrcek
- Another attempt at using the lsp API for some progress reporting
([#4218](https://github.com/haskell/haskell-language-server/pull/4218)) by @michaelpj
- [Migrate diagnosticTests] part of #4173 Migrate ghcide tests to hls test utils
([#4207](https://github.com/haskell/haskell-language-server/pull/4207)) by @soulomoon
- Prepare release 2.8.0.0
([#4191](https://github.com/haskell/haskell-language-server/pull/4191)) by @wz1000
- Stabilize the build system by correctly house keeping the dirtykeys and rule values [flaky test #4185 #4093]
([#4190](https://github.com/haskell/haskell-language-server/pull/4190)) by @soulomoon
- hls-cabal-plugin: refactor context search to use `readFields`
([#4186](https://github.com/haskell/haskell-language-server/pull/4186)) by @fendor
- 3944 extend the properties api to better support nested configuration
([#3952](https://github.com/haskell/haskell-language-server/pull/3952)) by @soulomoon

## 2.8.0.0

- Bindists for GHC 9.6.5
Expand Down
Loading

0 comments on commit 2e869db

Please sign in to comment.