Skip to content
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

Post 1.6.0.0 fixes and prepare 1.6.1.0 bug fix release #2647

Merged
merged 18 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
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: 2 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
, "**/README.md"
, "FUNDING.yml"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
]'

bench_init:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:

- name: Build the wrapper
if: matrix.ghc == '8.10.7'
run: cabal build exe:hls-wrapper -O2 $LINUX_CABAL_ARGS
run: cabal build exe:hls-wrapper -O2 $CABAL_ARGS

- name: Compress wrapper binary
if: matrix.ghc == '8.10.7'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
, "**/README.md"
, "FUNDING.yml"
, ".circleci/**"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
]'

caching:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
, "FUNDING.yml"
, ".circleci/**"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
]'

flags:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
upload-candidates:
description: 'Whether packages should be uploaded'
required: true
default: 'true'
default: 'false'
push:
branches:
- '*-hackage'
Expand All @@ -20,7 +20,7 @@ jobs:
check-and-upload-tarballs:
runs-on: ubuntu-latest
strategy:
fail-fast: ${{ github.event.inputs.upload-candidates == 'true' }}
fail-fast: ${{ github.event.inputs.upload-candidates != 'false' }}
matrix:
package: ["hie-compat", "hls-graph", "shake-bench",
"hls-plugin-api", "ghcide", "hls-test-utils",
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
path: ${{ steps.generate-dist-tarball.outputs.path }}

upload-candidate:
if: github.event.inputs.upload-candidates == 'true'
if: github.event.inputs.upload-candidates != 'false'
needs: check-and-upload-tarballs
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
, "**/README.md"
, "FUNDING.yml"
, "**/stack*.yaml"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
]'
- id: skip_check_no_nix
uses: fkirc/[email protected]
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/rerun.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
, "FUNDING.yml"
, ".circleci/**"
, "**/stack*.yaml"
, ".gitlab-ci.yaml"
, ".gitlab/**"
]'
# If we only change ghcide downstream packages we have not test ghcide itself
- id: skip_ghcide_check
Expand Down
19 changes: 9 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tar-aarch64-linux-deb10:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: aarch64-linux-deb10
TARBALL_ARCHIVE_SUFFIX: Linux-aarch64
TARBALL_EXT: tar.xz

build-armv7-linux-deb10:
Expand All @@ -107,7 +107,7 @@ tar-armv7-linux-deb10:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: armv7-linux-deb10
TARBALL_ARCHIVE_SUFFIX: Linux-armv7
TARBALL_EXT: tar.xz

build-x86_64-linux:
Expand All @@ -129,7 +129,7 @@ tar-x86_64-linux:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-linux
TARBALL_ARCHIVE_SUFFIX: Linux-x86_64
TARBALL_EXT: tar.xz

build-x86_64-linux-alpine:
Expand All @@ -153,7 +153,7 @@ tar-x86_64-linux-alpine:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-linux-alpine
TARBALL_ARCHIVE_SUFFIX: Linux-alpine-x86_64
TARBALL_EXT: tar.xz

build-x86_64-freebsd12:
Expand All @@ -173,7 +173,7 @@ tar-x86_64-freebsd12:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd12
TARBALL_ARCHIVE_SUFFIX: FreeBSD12-x86_64
TARBALL_EXT: tar.xz

build-x86_64-freebsd13:
Expand All @@ -197,7 +197,7 @@ tar-x86_64-freebsd13:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-freebsd13
TARBALL_ARCHIVE_SUFFIX: FreeBSD13-x86_64
TARBALL_EXT: tar.xz

build-x86_64-darwin:
Expand All @@ -217,7 +217,7 @@ tar-x86_64-darwin:
script:
- ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-darwin
TARBALL_ARCHIVE_SUFFIX: macOS-x86_64
TARBALL_EXT: tar.xz

build-aarch64-darwin:
Expand Down Expand Up @@ -269,7 +269,7 @@ tar-aarch64-darwin:
script:
- arch -arm64 /bin/bash ./.gitlab/tar.sh
variables:
TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
TARBALL_ARCHIVE_SUFFIX: macOS-aarch64
TARBALL_EXT: tar.xz

build-x86_64-windows:
Expand All @@ -278,7 +278,6 @@ build-x86_64-windows:
- new-x86_64-windows
parallel: *default_matrix
script:
- bash '-lc' 'pacman --noconfirm -S zip'
- $env:CHERE_INVOKING = "yes"
- bash '-lc' "ADD_CABAL_ARGS=$env:ADD_CABAL_ARGS GHC_VERSION=$env:GHC_VERSION CABAL_INSTALL_VERSION=$CABAL_INSTALL_VERSION .gitlab/ci.sh"
variables:
Expand All @@ -294,5 +293,5 @@ tar-x86_64-windows:
- $env:CHERE_INVOKING = "yes"
- bash '-lc' "TARBALL_ARCHIVE_SUFFIX=$env:TARBALL_ARCHIVE_SUFFIX TARBALL_EXT=$env:TARBALL_EXT .gitlab/tar.sh"
variables:
TARBALL_ARCHIVE_SUFFIX: x86_64-windows
TARBALL_ARCHIVE_SUFFIX: Windows-x86_64
TARBALL_EXT: zip
7 changes: 4 additions & 3 deletions .gitlab/tar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ ls -la out/
cd out/

# create tarball/zip
TARBALL_PREFIX="haskell-language-server-$("$CI_PROJECT_DIR/out/haskell-language-server-wrapper" --numeric-version)"
HLS_VERSION="$("$CI_PROJECT_DIR/out/haskell-language-server-wrapper" --numeric-version)"
TARBALL_PREFIX="haskell-language-server"
case "${TARBALL_EXT}" in
zip)
zip "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}.${TARBALL_EXT}" haskell-language-server-*
zip "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}-${HLS_VERSION}.zip" haskell-language-server-*
find . -type f ! -name '*.zip' -delete
;;
tar.xz)
tar caf "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}.${TARBALL_EXT}" haskell-language-server-*
tar caf "${TARBALL_PREFIX}-${TARBALL_ARCHIVE_SUFFIX}-${HLS_VERSION}.tar.xz" haskell-language-server-*
find . -type f ! -name '*.tar.xz' -delete
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog for haskell-language-server

## 1.6.0
## 1.6.0.0

Time for a new and exciting hls release:

Expand All @@ -9,7 +9,7 @@ Time for a new and exciting hls release:
- [Qualify imported names](https://haskell-language-server.readthedocs.io/en/latest/features.html#qualify-imported-names) thanks to @eddiemundo
- New plugin to support [selection range](https://haskell-language-server.readthedocs.io/en/latest/features.html#selection-range) (aka double click text selection) thanks to @kokobd
- Finally hls [supports *ghc 9.2.1*](https://github.com/haskell/haskell-language-server/issues/2179)
- Including core features and [many plugins](https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html#plugins-support-by-ghc-version))
- Including core features and [many plugins](https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html#plugins-support-by-ghc-version)
- Thanks to a great collective effort coordinated by @pepeiborra and with the help of @wz1000, @mpickering and @alanz among others
- Hls now also [supports *ghc 9.0.2*](https://github.com/haskell/haskell-language-server/issues/297) with all plugins but the stylish-haskell formatter
- Including the [wingman plugin](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) thanks to @isovector and @anka-213
Expand Down
19 changes: 6 additions & 13 deletions docs/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ and it is being used in nix environments.

- [ ] bump up package versions following the [pvp specification](https://pvp.haskell.org/) if they are not already updated. You could use [policeman](https://github.com/kowainik/policeman) to help with this step.
- [ ] create ${version}-hackage branch to trigger the hackage github workflow which will upload all changed packages to hackage as candidates
- [ ] for new plugins or packages, update hackage uploaders to add the author of the plugin/package and some hls maintainer(s) other than the owner of the hackage api key used to upload them (it has to be done by the owner of the api key, actually @pepeiborra)
- [ ] check manually candidates in hackage
- [ ] publish them definitely

### ghcup release

- [ ] push the release tag to the [haskell-language-server gitlab repo](https://gitlab.haskell.org/haskell/haskell-language-server) to trigger the build of ghcup specific artifacts
- [ ] download specific artifacts [only available in the gitlab build](#haskell-gitlab-release-pipeline) and compute their sha256sum
- [ ] upload them to the github release and complete the SHA256SUMS file
- [ ] change ghcup metadata to include the new release in <https://github.com/haskell/ghcup-metadata>
- example pull request [here](https://github.com/haskell/ghcup-metadata/pull/11)

Expand Down Expand Up @@ -124,20 +127,10 @@ It just kicks off a matrix of jobs varying across GHC versions and OSs, building
the binaries with Cabal and extracting them from the dist-newstyle directory.
The binaries are built with -O2.

One caveat is that we need to rename the binaries from
haskell-language-server/haskell-language-server-wrapper to hls/hls-wrapper due to
path length limitations on windows. But whenever we upload them to the release,
we make sure to upload them as their full name variant.

### Failing workflow

If the workflow fail and all of some binaries has not been uploaded,
the prerelease and the tag itself has to be recreated to start it again.
If only some of the artefacts are missing, an alternative could be make
the release in a fork and upload manually them.

If they are missing due to ci specific problems we can build the executable locally
and add it to the existing release.
If the workflow fail and some binaries has been already uploaded,
those artifacts must be removed and the build should be re-ran (the build tries to upload themm all and it fails if there is an existing artifact with the same name)

### Updating release artifacts

Expand Down Expand Up @@ -171,7 +164,7 @@ The script will upload the tarballs as candidates, maintainers will have to chec

The project is present in the haskell gitlab server: <https://gitlab.haskell.org/haskell/haskell-language-server>
The main motivation is to leverage the ci infrastructure which includes architectures not included in the github ci.
The specific architectures only available through gitlab are: `armv7-linux`, `x86_64-freebsd`, `aarch64-darwin`, `aarch64-linux`
The specific architectures only available through gitlab are: `aarch64-darwin`, `aarch64-linux`, `armv7-linux`, `x86_64-freebsd12`, `x86_64-freebsd13`, `x86_64-linux-alpine`
The gitlab pipeline uses the configuration file [.gitlab-ci.yml](https://github.com/haskell/haskell-language-server/blob/master/.gitlab-ci.yml)
and the sh scripts in [.gitlab](https://github.com/haskell/haskell-language-server/tree/master/.gitlab)
It is triggered by pushing a tag to the gitlab repo.
6 changes: 4 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Installation

A typical haskell-language-server installation consists of:

- One binary file for each supported ghc version: `haskell-language-server-${ghcVersion}`
- Another binary named `haskell-language-version-wrapper` which analyzes the project or file in the current working dir
and calls the appropiate `haskell-language-server-${ghcVersion}` variant.
Expand All @@ -15,13 +16,15 @@ A typical haskell-language-server installation consists of:
## ghcup

If you are using [`ghcup`](https://www.haskell.org/ghcup/) to manage your installations, you can install `haskell-language-server` with

```bash
ghcup install hls
```

You can check if HLS is available for your platorm via ghcup here: <https://haskell.org/ghcup/install/#supported-platforms>.

You can also install HLS from source without checking out the code manually:

```bash
ghcup compile hls -v 1.4.0 8.10.7
```
Expand All @@ -31,6 +34,7 @@ Check `ghcup compile hls --help` for a full list of compilation options.
## chocolatey

If you are using [`chocolatey`](https://chocolatey.org/) to manage your installations in windows, [you can install `haskell-language-server`](https://community.chocolatey.org/packages/haskell-language-server) with

```bash
choco install haskell-language-server
````
Expand Down Expand Up @@ -79,8 +83,6 @@ pkg install hs-haskell-language-server
to install it. At the moment, HLS installed this way only supports the same GHC
version as the ports one.



## Installation from source

### Common pre-requirements
Expand Down
30 changes: 26 additions & 4 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,40 @@ The server log will show which cradle is being chosen.

Using an explicit `hie.yaml` to configure the cradle can resolve the problem, see the [configuration page](./configuration.md#configuring-your-project-build).

### Static binaries
### Static binaries and template haskell support

Static binaries use the GHC linker for dynamically loading dependencies when typechecking TH code, and this can run into issues when loading shared objects linked against mismatching system libraries, or into GHC linker bugs (mainly the Mach linker used in Mac OS, but also potentially the ELF linker).
Dynamically linked binaries (including`ghci`) use the system linker instead of the GHC linker and avoid both issues.

The easiest way to obtain a dynamically linked HLS binary is to build it locally. With `cabal` this can be done as follows:

cabal update && cabal install haskell-language-server --enable-executable-dynamic
```bash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did a mini install from source section :-/

cabal update && cabal install pkg:haskell-language-server --ghc-options="-dynamic"
```

If you are compiling with a ghc version with a specific `cabal-ghc${ghcVersion}.project` in the repo you will have to use it. For example for ghc-9.0.x:

```bash
cabal update && cabal install pkg:haskell-language-server --project-file=cabal-ghc90.project --ghc-options="-dynamic"
```

With `stack` you also need add the ghc option `-dynamic`.

With `stack` you need to manually add the ghc option `-dynamic`.
```bash
stack install haskell-language-server --stack-yaml=stack-${ghcVersion}.yaml --ghc-options="-dynamic"
```

Note: HLS binaries prior to 1.6.0 were statically linking `glibc` which is not a supported configuration and has been replaced by `musl`.
You also can leverage `ghcup compile hls`:

```bash
ghcup compile hls -g master --ghc 8.10.7 -- --ghc-options="-dynamic"
```

as it uses cabal underneath you might need to use a specific cabal.project for some ghc versions:

```bash
ghcup compile hls -g master --ghc 9.0.2 --project-file cabal-ghc90.project -- --ghc-options="-dynamic"
```

### Preprocessors

Expand Down
2 changes: 1 addition & 1 deletion haskell-language-server.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.4
category: Development
name: haskell-language-server
version: 1.6.0.0
version: 1.6.1.0
synopsis: LSP server for GHC
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-tactics-plugin/hls-tactics-plugin.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 2.4
category: Development
name: hls-tactics-plugin
version: 1.6.0.0
version: 1.6.1.0
synopsis: Wingman plugin for Haskell Language Server
description:
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
Expand Down