Haskell Language Server 2.6.0.0 is now available

Binaries for this release are available at
Index of /~hls/haskell-language-server-2.6.0.0/.

These binaries can be installed using GHCup, using the vanilla metadata channel.

ghcup --url-source=https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install hls 2.6.0.0

All of these tarballs have associated GPG signatures. The signature should be from Zubin Duggal <zubin@well-typed.com> (key ID 588764FBE22D19C4).

The prebuilt binaries in this release support the following GHC versions:

  • 9.2.8
  • 9.4.8
  • 9.6.4
  • 9.8.1

Changelog

  • Bindists for GHC 9.6.4
  • A new semantic tokens plugin (#3892, @soulomoon).
  • Improvements to multiple home unit support with GHC 9.4. Using cabal 3.11+ will
    load proper multiple home unit sessions by default, fixing a lot of issues with
    loading and reloading projects that have more than one component (#3462, @wz1000).
  • Removed implicit-hie, resulting in better behaviour for projects without cradles.
  • Don’t produce diagnostics for disabled plugins (#3941, @fendor).
  • Many other bug fixes.
29 Likes

These two are very good improvements!

4 Likes

Do semantic tokens correspond to the Semantic Highlight of VSCode?

Yes, it provides the semantic tokens for semantic highlighting.

Yes, it does indeed (20 character posting limit defeated).

This is mega exciting! I see Cabal 3.11+ isn’t officially released yet. If we want to use this work is it enough to install cabal-install from source (the binary), or do I need to build haskell-language-server with a source-repository-package entry (so compiling HLS against a newer version of Cabal-the-library)?

2 Likes

You don’t need to recompile HLS, just install a recent enough version of the cabal-install binary.

I look forward to the bug reports :slight_smile:

4 Likes

Does it being a “plugin” mean it is opt-in, or are semantic tokens used by default?

Normally plugins are enabled by default, this one is currently disabled by default (you should be able to turn it on via your editor config once the client plugins get updated). It’s disabled because a) it’s new and came in just before the release, so we’re not totally sure how stable it is, and b) full semantic tokens is… a lot, and it’s unclear if it should ever be the default.

2 Likes

ghcup install cabal --force -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head (with variants for x86_64 macOS and x86_64 Windows here: Release cabal-head · haskell/cabal · GitHub)

1 Like

Thanks, but I don’t use ghcup (I use Haskell.nix). Hopefully this helps others though!

1 Like

It is the way now HLS organize its development and provide features. A lot of plugins.
You can enable or disable plugins as you desire.
And semantic tokens is still in very beta state(active development and bug fix). Welcome to helping us test it out.

When do you think cabal install -w ghc-9.8 haskell-language-server will be properly supported from main Hackage?

(I had missed this release announce, didn’t surface in my discourse notifications…)

We’re basically blocked by our remaining allow-newers, which you can see here: https://github.com/haskell/haskell-language-server/blob/master/cabal.project#L91

1 Like

In fact, I see we got a release of commutative-semigroups, and the ekg stuff isn’t on by default, so it might now actually work!

Am I reading the blame correctly that those bumps have been around for two months? That seems like an excessively long time for simple bounds extensions. Perhaps those packages should get more maintainers?

1 Like

That would be nice :slight_smile: generally we are in a bit of an awkward situation with HLS where our dependency set is a bit higher than we would like, and we often have to do some prodding. Probably we should also try to cut down!

1 Like

I see @andreasabel has made a Hackage revision, so ekg-core should be good to go now too.

Sadly the text bound wasn’t bumped and we still have the primitive-extras issue, it seems.

That’s not enough if any package in your dependencies has build-type: Custom. As figured out by @TeofilC, adding the following to your cabal.project helps:

allow-newer: 
  *:Cabal,
  *:Cabal-syntax

source-repository-package
    type: git
    location: https://github.com/haskell/cabal.git
    subdir: Cabal

source-repository-package
    type: git
    location: https://github.com/haskell/cabal.git
    subdir: Cabal-syntax
4 Likes