Skip to content

Commit

Permalink
Prepare 1.5.1 (#2393)
Browse files Browse the repository at this point in the history
* Rerun tests between run attempts

* without quotes

* Bump up versions for hackage

* Add support for auth github requests

As anonymous ones reach the api limit quickly
Via a unique argument with a github oauth token

* Add changelog for 1.5.1

* Fix makrdownlint warnings

* Bump up index state

* Bump up plugin version

* build with -v3 on error

* More backjumps for tests and benchs

* Add last prs

* eval plugin needs ghcide>=1.5.0.1

* Include #2395 in the changelog

* Ignore deferred tests for win and 9.0.1

* Ignore tactics tests for ubuntu+8.6.5
  • Loading branch information
jneira authored and pepeiborra committed Nov 28, 2021
1 parent a60532e commit 4a833d3
Show file tree
Hide file tree
Showing 19 changed files with 110 additions and 43 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/hackage.yml
Expand Up @@ -133,11 +133,18 @@ jobs:
# For floskell and stylish-haskell
echo " floskell:base, floskell:ghc-prim, stylish-haskell:Cabal,stylish-haskell:ghc-lib-parser," >> cabal.project
- name: "Build all package components in isolation"
- name: "Build main package components in isolation"
if: steps.get-hackage-version.outputs.exists != 'true'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
cabal build --enable-tests --enable-benchmarks
cabal build
- name: "Build package tests and benchmarks in isolation"
if: steps.get-hackage-version.outputs.exists != 'true'
run: |
cd $(ls -d ./incoming/${{ matrix.package }}-*)
# cabal-3.4.0.0 run out of backjumps with tests and benchs enabled
cabal build --enable-tests --enable-benchmarks --max-backjumps 8000
- name: "Generate haddock for hackage"
if: steps.get-hackage-version.outputs.exists != 'true'
Expand Down
52 changes: 32 additions & 20 deletions .github/workflows/test.yml
Expand Up @@ -140,13 +140,24 @@ jobs:
src/**/*.hs exe/*.hs
- name: Build
# Retry it three times to workaround compiler segfaults in windows
run: cabal build || cabal build || cabal build
run: cabal build

- name: Set test options
run: |
echo "TEST_OPTS=-j1 --rerun-update --rerun-filter failures,exceptions,new" >> $GITHUB_ENV
- name: Cache test log bewteen attempts of the same run
uses: actions/cache@v2
env:
cache-name: cache-test-log
with:
path: .tasty-rerun-log
key: v1-${{ runner.os }}-${{ matrix.ghc }}-test-log-${{ github.sha }}

- if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
name: Test ghcide
# run the tests without parallelism to avoid running out of memory
run: cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun"
run: cabal test ghcide --test-options="$TEST_OPTS" || cabal test ghcide --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="$TEST_OPTS"

- if: matrix.test
name: Test func-test suite
Expand All @@ -156,7 +167,7 @@ jobs:
# run the tests without parallelism, otherwise tasty will attempt to run
# all functional test cases simultaneously which causes way too many hls
# instances to be spun up for the poor github actions runner to handle
run: cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
run: cabal test func-test --test-options="$TEST_OPTS" || cabal test func-test --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="$TEST_OPTS"

- if: matrix.test
name: Test wrapper-test suite
Expand All @@ -166,63 +177,64 @@ jobs:
# run the tests without parallelism, otherwise tasty will attempt to run
# all functional test cases simultaneously which causes way too many hls
# instances to be spun up for the poor github actions runner to handle
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"

run: cabal test wrapper-test --test-options="$TEST_OPTS" || cabal test wrapper-test --test-options="$TEST_OPTS" || cabal test wrapper-test --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0.1'
name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="-j1 --rerun-update" || cabal test hls-brittany-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="-j1 --rerun"
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"

- if: matrix.test && matrix.ghc != '9.0.1'
name: Test hls-class-plugin
run: cabal test hls-class-plugin --test-options="-j1 --rerun-update" || cabal test hls-class-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="-j1 --rerun"
run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="-j1 --rerun-update" || cabal test hls-eval-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="-j1 --rerun"
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
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun-update" || cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun"
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
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="-j1 --rerun-update" || cabal test hls-splice-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="-j1 --rerun"
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'
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun-update" || cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun"
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"

- if: matrix.test
name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-ormolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="-j1 --rerun"
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="-j1 --rerun"
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.0.1'
- if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="-j1 --rerun-update" || cabal test hls-tactics-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1 --rerun"
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"

- if: matrix.test
name: Test hls-refine-imports-plugin test suite
run: cabal test hls-refine-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="-j1 --rerun"
run: cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-explicit-imports-plugin test suite
run: cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun"
run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-call-hierarchy-plugin test suite
run: cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun-update" || cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun"
run: cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin --test-options="-j1 --rerun-update" || cabal test hls-rename-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="-j1 --rerun"
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
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="-j1 --rerun-update" || cabal test hls-hlint-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="-j1 --rerun"
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"

test_post_job:
if: always()
Expand Down
48 changes: 45 additions & 3 deletions ChangeLog.md
@@ -1,5 +1,45 @@
# Changelog for haskell-language-server

## 1.5.1

This is a bug fix release for two regressions found after releasing 1.5.0:

- [#2365](https://github.com/haskell/haskell-language-server/issue/2365): hs-boot files not handled correctly, discovered in the ghc codebase and fixed with [#2377](https://github.com/haskell/haskell-language-server/pull/2377)
- [#2379](https://github.com/haskell/haskell-language-server/issue/2379): `tried to look at linkable for GetModIfaceWithoutLinkable for NormalizedFilePath...` error handling template haskell, fixed with [#2380](https://github.com/haskell/haskell-language-server/pull/2380)

Both quick fixes thanks to @pepeiborra

Also it fixes some long standing bugs in the hlint plugin due to comments being ignored (see [#2366](https://github.com/haskell/haskell-language-server/pull/2366))

### Pull requests merged for 1.5.1

- Fix hls-graph build with embed-files flag
([#2395](https://github.com/haskell/haskell-language-server/pull/2395)) by @pepeiborra
- Prepare 1.5.1
([#2393](https://github.com/haskell/haskell-language-server/pull/2393)) by @jneira
- Revert "Update to latest prettyprinter API (#2352)"
([#2389](https://github.com/haskell/haskell-language-server/pull/2389)) by @pepeiborra
- Add extra logging around build queue
([#2388](https://github.com/haskell/haskell-language-server/pull/2388)) by @pepeiborra
- docs: Fix typo
([#2386](https://github.com/haskell/haskell-language-server/pull/2386)) by @nh2
- Update release instructions
([#2384](https://github.com/haskell/haskell-language-server/pull/2384)) by @jneira
- ghcide: Update dependency on `hls-plugin-api`
([#2382](https://github.com/haskell/haskell-language-server/pull/2382)) by @hololeap
- Fix regression in GhcSessionDeps
([#2380](https://github.com/haskell/haskell-language-server/pull/2380)) by @pepeiborra
- Boot files
([#2377](https://github.com/haskell/haskell-language-server/pull/2377)) by @pepeiborra
- hls-module-name-plugin: Add missing golden file to hackage tarball
([#2374](https://github.com/haskell/haskell-language-server/pull/2374)) by @maralorn
- hls-explicit-imports-plugin: Add golden files to hackage tarball
([#2373](https://github.com/haskell/haskell-language-server/pull/2373)) by @maralorn
- Update ghcide dependency for various plugins
([#2368](https://github.com/haskell/haskell-language-server/pull/2368)) by @hololeap
- Fix several hlint issues related with the use of parsed module without comments
([#2366](https://github.com/haskell/haskell-language-server/pull/2366)) by @jneira

## 1.5.0

Time for another hls release:
Expand All @@ -22,6 +62,8 @@ Time for another hls release:

### Pull requests merged for 1.5.0

- Prepare 1.5.0
([#2361](https://github.com/haskell/haskell-language-server/pull/2361)) by @jneira
- More completion fixes
([#2354](https://github.com/haskell/haskell-language-server/pull/2354)) by @pepeiborra
- Update to latest prettyprinter API
Expand Down Expand Up @@ -986,6 +1028,7 @@ This version uses `lsp-1.2.0`, `hls-plugin-api-1.1.0`, and `ghcide-1.2.0.2`.
This is the celebratory release of Haskell Language Server 1.0.0!
This release includes a lot of internal changes, bug fixes, leaks plugged, and performance improvements, thanks to all our contributors.
Among others,

- We added the support for GHC 8.10.4, and removed the support for GHC 8.10.1
Afterward, we will support upmost 3 patch versions for each minor version of GHC, if no special situation happens.
- As by hie-bios >= 0.7.3, we use (`${XDG_CACHE_HOME}`)[https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html]`/hie-bios/...` (or similar depends on OS) as a build directory for Cabal.
Expand Down Expand Up @@ -1169,7 +1212,7 @@ Among others,
([#1266](https://github.com/haskell/haskell-language-server/pull/1266)) by @pepeiborra
- ghcide: Implements a CodeAction to disambiguate ambiguous symbols
([#1264](https://github.com/haskell/haskell-language-server/pull/1264)) by @konn
- Doctest comment parsing using module annotations in Eval Plugin
- Doctest comment parsing using module annotations in Eval Plugin
([#1232](https://github.com/haskell/haskell-language-server/pull/1232)) by @konn
- Apply some hlint suggestions, silence some others.
([#1227](https://github.com/haskell/haskell-language-server/pull/1227)) by @peterwicksstringfield
Expand Down Expand Up @@ -1370,7 +1413,6 @@ And remember, we have a new brand logo, courtesy of @Ailrun :slightly_smiling_fa
- ghcide lives now directly in this repository
- the test suite has been cleaned and improved (continuing the work done in 0.7.0)


Thanks to all contributors and happy new year!

### Pull requests merged for 0.8.0
Expand Down Expand Up @@ -1624,7 +1666,7 @@ There's also plenty of bug fixes, improvements and updates to the underlying too
If you're eager to try all this out, haskell-language-server is now also installable via [ghcup](https://www.haskell.org/ghcup/):

```shell
$ ghcup install hls
> ghcup install hls
```

### Pull requests merged for 0.5.0
Expand Down
10 changes: 8 additions & 2 deletions GenChangelogs.hs
@@ -1,18 +1,20 @@
#!/usr/bin/env cabal
{- cabal:
build-depends: base, process, text, github, time >= 1.9
build-depends: base, bytestring, process, text, github, time >= 1.9
-}

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}

import Control.Monad
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Maybe
import qualified Data.Text as T
import Data.Time.Format.ISO8601
import Data.Time.LocalTime
import GitHub
import System.Environment
import System.Process

main = do
Expand All @@ -23,7 +25,11 @@ main = do
lastDateStr <- last . lines <$> readProcess "git" ["show", "-s", "--format=%cI", "-1", last tags] ""
lastDate <- zonedTimeToUTC <$> iso8601ParseM lastDateStr

prs <- github' $ pullRequestsForR "haskell" "haskell-language-server" stateClosed FetchAll
args <- getArgs
let githubReq = case args of
[] -> github'
token:_ -> github (OAuth $ BS.pack token)
prs <- githubReq $ pullRequestsForR "haskell" "haskell-language-server" stateClosed FetchAll
let prsAfterLastTag = either (error . show)
(foldMap (\pr -> [pr | inRange pr]))
prs
Expand Down
2 changes: 1 addition & 1 deletion cabal-ghc901.project
Expand Up @@ -49,7 +49,7 @@ source-repository-package

write-ghc-environment-files: never

index-state: 2021-11-11T19:25:51Z
index-state: 2021-11-23T21:12:30Z

constraints:
-- These plugins don't work on GHC9 yet
Expand Down
2 changes: 1 addition & 1 deletion cabal-ghc921.project
Expand Up @@ -34,7 +34,7 @@ package *

write-ghc-environment-files: never

index-state: 2021-11-11T19:25:51Z
index-state: 2021-11-23T21:12:30Z

constraints:
-- These plugins doesn't work on GHC92 yet
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Expand Up @@ -38,7 +38,7 @@ package *

write-ghc-environment-files: never

index-state: 2021-11-11T19:25:51Z
index-state: 2021-11-23T21:12:30Z

constraints:
hyphenation +embed
Expand Down
2 changes: 1 addition & 1 deletion hls-test-utils/hls-test-utils.cabal
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: hls-test-utils
version: 1.1.0.1
version: 1.1.0.2
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>
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-class-plugin/hls-class-plugin.cabal
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: hls-class-plugin
version: 1.0.1.1
version: 1.0.1.2
synopsis:
Class/instance management plugin for Haskell Language Server

Expand Down

0 comments on commit 4a833d3

Please sign in to comment.