Skip to content

Prepare release 2.9.0.0 #4319

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 9 commits into from
Jun 19, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/scripts/env.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 17 additions & 4 deletions .github/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -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)
@@ -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.
@@ -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

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

enter_test_package
create_cradle
create_cabal_project
test_all_hls "$GHCUP_BIN"

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

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

;;
19 changes: 14 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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", "9.2.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"
@@ -154,6 +154,15 @@ jobs:
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections"
}
- ghc: 9.10.1
platform:
{ 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"
}
container:
image: ${{ matrix.platform.image }}
steps:
@@ -213,7 +222,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", "9.2.8" ]
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
@@ -273,7 +282,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", "9.2.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -318,7 +327,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", "9.2.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -363,7 +372,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", "9.2.8"]
steps:
- name: install windows deps
shell: pwsh
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
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
- Generate a ChangeLog via `./GenChangelogs.hs <api-key> <tag>`
- `<tag>` is the git tag you want to generate the ChangeLog from.
- `<api-key>` is a github access key: https://github.com/settings/tokens
- [ ] update https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html#current-ghc-version-support-status
- [ ] create release branch as `wip/<version>`
- `git switch -c wip/<version>`
- [ ] create release tag as `<version>`
@@ -50,7 +51,6 @@
- [ ] publish release on github
- [ ] upload hackage packages
- requires credentials
- [ ] update https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html#current-ghc-version-support-status
- [ ] Supported tools table needs to be updated:
- https://www.haskell.org/ghcup/install/#supported-platforms
- https://github.com/haskell/ghcup-hs/blob/master/docs/install.md#supported-platforms
10 changes: 2 additions & 8 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -41,17 +41,11 @@ constraints:
bitvec -simd,



if impl(ghc >= 9.9)
benchmarks: False
constraints:
lens >= 5.3.2,
-- See
-- https://github.com/haskell/stylish-haskell/issues/479
-- https://github.com/ennocramer/floskell/pull/82
-- https://github.com/ndmitchell/hlint/pull/1594
haskell-language-server -stylishHaskell -hlint -retrie -splice -floskell,
allow-newer:
haddock-library:base,
haddock-library:containers,
benchmarks: False
else
benchmarks: True
1 change: 1 addition & 0 deletions docs/support/ghc-version-support.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ Support status (see the support policy below for more details):

| GHC version | Last supporting HLS version | Support status |
|--------------|--------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| 9.10.1 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
| 9.8.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
| 9.8.1 | [2.6.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.6.0.0) | full support |
| 9.6.5 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
15 changes: 8 additions & 7 deletions docs/support/plugin-support.md
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
## Current plugin support tiers

| Plugin | Tier | Unsupported GHC versions |
|-------------------------------------|------|--------------------------|
| ----------------------------------- | ---- | ------------------------ |
| ghcide core plugins | 1 | |
| `hls-call-hierarchy-plugin` | 1 | |
| `hls-code-range-plugin` | 1 | |
@@ -47,23 +47,24 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-refactor-plugin` | 1 | |
| `hls-alternate-number-plugin` | 2 | |
| `hls-cabal-fmt-plugin` | 2 | |
| `hls-cabal-gild-plugin` | 2 | |
| `hls-class-plugin` | 2 | |
| `hls-change-type-signature-plugin` | 2 | |
| `hls-eval-plugin` | 2 | |
| `hls-explicit-fixity-plugin` | 2 | |
| `hls-explicit-record-fields-plugin` | 2 | |
| `hls-fourmolu-plugin` | 2 | |
| `hls-gadt-plugin` | 2 | |
| `hls-hlint-plugin` | 2 | |
| `hls-hlint-plugin` | 2 | 9.10.1 |
| `hls-module-name-plugin` | 2 | |
| `hls-notes-plugin` | 2 | |
| `hls-qualify-imported-names-plugin` | 2 | |
| `hls-ormolu-plugin` | 2 | |
| `hls-rename-plugin` | 2 | |
| `hls-stylish-haskell-plugin` | 2 | |
| `hls-stylish-haskell-plugin` | 2 | 9.10.1 |
| `hls-overloaded-record-dot-plugin` | 2 | |
| `hls-semantic-tokens-plugin` | 2 | |
| `hls-floskell-plugin` | 3 | |
| `hls-stan-plugin` | 3 | 9.2.(4-8) |
| `hls-retrie-plugin` | 3 | |
| `hls-splice-plugin` | 3 | |
| `hls-floskell-plugin` | 3 | 9.10.1 |
| `hls-stan-plugin` | 3 | 9.2.(4-8), 9.10.1 |
| `hls-retrie-plugin` | 3 | 9.10.1 |
| `hls-splice-plugin` | 3 | 9.10.1 |
6 changes: 3 additions & 3 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ cabal-version: 3.4
build-type: Simple
category: Development
name: ghcide
version: 2.8.0.0
version: 2.9.0.0
license: Apache-2.0
license-file: LICENSE
author: Digital Asset and Ghcide contributors
@@ -81,8 +81,8 @@ library
, hie-bios ^>=0.14.0
, hie-compat ^>=0.3.0.0
, hiedb ^>= 0.6.0.0
, hls-graph == 2.8.0.0
, hls-plugin-api == 2.8.0.0
, hls-graph == 2.9.0.0
, hls-plugin-api == 2.9.0.0
, implicit-hie >= 0.1.4.0 && < 0.1.5
, lens
, list-t
223 changes: 113 additions & 110 deletions haskell-language-server.cabal

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hls-graph/hls-graph.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: hls-graph
version: 2.8.0.0
version: 2.9.0.0
synopsis: Haskell Language Server internal graph API
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server/tree/master/hls-graph#readme>
4 changes: 2 additions & 2 deletions hls-plugin-api/hls-plugin-api.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: hls-plugin-api
version: 2.8.0.0
version: 2.9.0.0
synopsis: Haskell Language Server API for plugin communication
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -66,7 +66,7 @@ library
, filepath
, ghc
, hashable
, hls-graph == 2.8.0.0
, hls-graph == 2.9.0.0
, lens
, lens-aeson
, lsp ^>=2.7
6 changes: 3 additions & 3 deletions hls-test-utils/hls-test-utils.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: hls-test-utils
version: 2.8.0.0
version: 2.9.0.0
synopsis: Utilities used in the tests of Haskell Language Server
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -43,8 +43,8 @@ library
, directory
, extra
, filepath
, ghcide == 2.8.0.0
, hls-plugin-api == 2.8.0.0
, ghcide == 2.9.0.0
, hls-plugin-api == 2.9.0.0
, lens
, lsp
, lsp-test ^>=0.17

Unchanged files with check annotations Beta

{-# LANGUAGE CPP #-}

Check warning on line 1 in exe/Wrapper.hs

GitHub Actions / Hlint check run

Warning in module Main: Use module export list ▫︎ Found: "module Main where" ▫︎ Perhaps: "module Main (\n module Main\n ) where" ▫︎ Note: an explicit list is usually better
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
[] -> error $ "GHC version could not be parsed: " <> version
((runTime, _):_)
| compileTime == runTime -> do
atomicModifyIORef' cradle_files (\xs -> (cfp:xs,()))

Check warning on line 662 in ghcide/session-loader/Development/IDE/Session.hs

GitHub Actions / Hlint check run

Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef' cradle_files (\\ xs -> (cfp : xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ cradle_files ((:) cfp)"
session (hieYaml, toNormalizedFilePath' cfp, opts, libDir)
| otherwise -> return (([renderPackageSetupException cfp GhcVersionMismatch{..}], Nothing),[])
-- Failure case, either a cradle error or the none cradle
{-# LANGUAGE DeriveAnyClass #-}

Check warning on line 1 in ghcide/session-loader/Development/IDE/Session/Diagnostics.hs

GitHub Actions / Hlint check run

Warning in module Development.IDE.Session.Diagnostics: Use module export list ▫︎ Found: "module Development.IDE.Session.Diagnostics where" ▫︎ Perhaps: "module Development.IDE.Session.Diagnostics (\n module Development.IDE.Session.Diagnostics\n ) where" ▫︎ Note: an explicit list is usually better
module Development.IDE.Session.Diagnostics where
import Control.Applicative
surround start s end = do
guard (listToMaybe s == Just start)
guard (listToMaybe (reverse s) == Just end)
pure $ drop 1 $ take (length s - 1) s

Check warning on line 87 in ghcide/session-loader/Development/IDE/Session/Diagnostics.hs

GitHub Actions / Hlint check run

Warning in parseMultiCradleErr in module Development.IDE.Session.Diagnostics: Use drop1 ▫︎ Found: "drop 1" ▫︎ Perhaps: "drop1"
multiCradleErrMessage :: MultiCradleErr -> [String]
multiCradleErrMessage e =
import Data.Tuple.Extra (dupe)
import Data.Unique as Unique
import Debug.Trace
import Development.IDE.Core.FileStore (resetInterfaceStore)

Check warning on line 72 in ghcide/src/Development/IDE/Core/Compile.hs

GitHub Actions / Hlint check run

Warning in module Development.IDE.Core.Compile: Use fewer imports ▫︎ Found: "import Development.IDE.Core.FileStore ( resetInterfaceStore )\nimport Development.IDE.Core.FileStore ( shareFilePath )\n" ▫︎ Perhaps: "import Development.IDE.Core.FileStore\n ( resetInterfaceStore, shareFilePath )\n"
import Development.IDE.Core.Preprocessor
import Development.IDE.Core.RuleTypes
import Development.IDE.Core.Shake
{ source_version = ver
, old_value = m_old
, get_file_version = use GetModificationTime_{missingFileDiagnostics = False}
, get_linkable_hashes = \fs -> map (snd . fromJust . hirCoreFp) <$> uses_ GetModIface fs

Check warning on line 826 in ghcide/src/Development/IDE/Core/Rules.hs

GitHub Actions / Hlint check run

Suggestion in getModIfaceFromDiskRule in module Development.IDE.Core.Rules: Use fmap ▫︎ Found: "\\ fs -> map (snd . fromJust . hirCoreFp) <$> uses_ GetModIface fs" ▫︎ Perhaps: "fmap (map (snd . fromJust . hirCoreFp)) . uses_ GetModIface"
, regenerate = regenerateHiFile session f ms
}
r <- loadInterface (hscEnv session) ms linkableType recompInfo
-- thus bump its modification time, forcing this rule to be rerun every time.
exists <- liftIO $ doesFileExist obj_file
mobj_time <- liftIO $
if exists

Check warning on line 1108 in ghcide/src/Development/IDE/Core/Rules.hs

GitHub Actions / Hlint check run

Warning in getLinkableRule in module Development.IDE.Core.Rules: Use whenMaybe ▫︎ Found: "if exists then Just <$> getModTime obj_file else pure Nothing" ▫︎ Perhaps: "whenMaybe exists (getModTime obj_file)"
then Just <$> getModTime obj_file
else pure Nothing
case mobj_time of
import Development.IDE.Core.RuleTypes
import Development.IDE.Core.Tracing
import Development.IDE.Core.WorkerThread
import Development.IDE.GHC.Compat (NameCache,

Check warning on line 128 in ghcide/src/Development/IDE/Core/Shake.hs

GitHub Actions / Hlint check run

Warning in module Development.IDE.Core.Shake: Use fewer imports ▫︎ Found: "import Development.IDE.GHC.Compat\n ( NameCache, initNameCache, knownKeyNames )\nimport Development.IDE.GHC.Compat\n ( NameCacheUpdater(NCU), mkSplitUniqSupply, upNameCache )\n" ▫︎ Perhaps: "import Development.IDE.GHC.Compat\n ( NameCache,\n initNameCache,\n knownKeyNames,\n NameCacheUpdater(NCU),\n mkSplitUniqSupply,\n upNameCache )\n"
initNameCache,
knownKeyNames)
import Development.IDE.GHC.Orphans ()
-- | Returns a logger that produces telemetry events in a single span.
telemetryLogRecorder :: SpanInFlight -> Recorder (WithPriority (Doc a))
telemetryLogRecorder sp = Recorder $ \WithPriority {..} ->
liftIO $ addEvent sp (fromString $ show priority) (encodeUtf8 $ trim $ renderStrict $ layoutCompact $ payload)

Check warning on line 64 in ghcide/src/Development/IDE/Core/Tracing.hs

GitHub Actions / Hlint check run

Suggestion in telemetryLogRecorder in module Development.IDE.Core.Tracing: Redundant $ ▫︎ Found: "layoutCompact $ payload" ▫︎ Perhaps: "layoutCompact payload"
where
-- eventlog message size is limited by EVENT_PAYLOAD_SIZE_MAX = STG_WORD16_MAX
trim = T.take (fromIntegral(maxBound :: Word16) - 10)
name' <- newIfaceName (mkVarOcc $ getOccString name)
pure $ ifid{ ifName = name' }
| otherwise = pure ifid
unmangle_decl_name _ifid = error $ "tcIfaceId: got non IfaceId: "

Check warning on line 200 in ghcide/src/Development/IDE/GHC/CoreFile.hs

GitHub Actions / Hlint check run

Suggestion in tcIfaceId in module Development.IDE.GHC.CoreFile: Redundant $ ▫︎ Found: "error $ \"tcIfaceId: got non IfaceId: \"" ▫︎ Perhaps: "error \"tcIfaceId: got non IfaceId: \""
-- invariant: 'IfaceId' is always a 'IfaceId' constructor
getIfaceId (AnId identifier) = identifier
getIfaceId _ = error "tcIfaceId: got non Id"
examplesPath = "bench/example"
defConfig :: Config
Success defConfig = execParserPure defaultPrefs (info configP fullDesc) []

Check warning on line 345 in ghcide-bench/src/Experiments.hs

GitHub Actions / flags (9.6, ubuntu-latest)

Pattern match(es) are non-exhaustive

Check warning on line 345 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, ubuntu-latest, true)

Pattern match(es) are non-exhaustive

Check warning on line 345 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, windows-latest, true)

Pattern match(es) are non-exhaustive

Check warning on line 345 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, macOS-latest, false)

Pattern match(es) are non-exhaustive
quiet, verbose :: Config -> Bool
verbose = (== All) . verbosity
results <- forM benchmarks $ \b@Bench{name} -> do
let p = (proc (ghcide ?config) (allArgs name dir))
{ std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe }
run sess = withCreateProcess p $ \(Just inH) (Just outH) (Just errH) pH -> do

Check warning on line 453 in ghcide-bench/src/Experiments.hs

GitHub Actions / flags (9.6, ubuntu-latest)

Pattern match(es) are non-exhaustive

Check warning on line 453 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, ubuntu-latest, true)

Pattern match(es) are non-exhaustive

Check warning on line 453 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, windows-latest, true)

Pattern match(es) are non-exhaustive

Check warning on line 453 in ghcide-bench/src/Experiments.hs

GitHub Actions / test (9.6, macOS-latest, false)

Pattern match(es) are non-exhaustive
-- Need to continuously consume to stderr else it gets blocked
-- Can't pass NoStream either to std_err
hSetBuffering errH NoBuffering