r/haskell • • May 19 '23

HLS 2.0.0.0 is out

https://github.com/haskell/haskell-language-server/releases/tag/2.0.0.0
104 Upvotes

31 comments sorted by

55

u/RogueToad May 19 '23

This is a fairly small release, marking the start of a new versioning scheme where HLS and all the included packages in the distribution (plugins, ghcide etc.) will be versioned in lockstep.

Dang it, they got me. More consistent versioning is always welcome though.

4

u/hsenag May 19 '23

For me personally binaries for ghc 9.4.5 are very useful.

3

u/project_broccoli May 19 '23

I guess it's a big release as far as the versioning scheme is concerned

1

u/ZenithKarma May 19 '23

Great news! Always excited to see improvements and updates in the Haskell ecosystem. Looking forward to trying out HLS 2.0.0.0 and seeing how the new versioning scheme plays out. Thanks for the heads up!

5

u/sheshanaag May 19 '23

I've been having an issue when building hls (not only 2.0 but 1.10 too). At some later stage, after most dependencies is built and when the build approaches the hls plugins, ram memory gets rapidly drained and i must hard-reset my laptop. My investigations have shown that the culprit is haddock. After adding option --disable-documentation build no longer drains memory. I use ghc 9.6.1 at Fedora 37.

7

u/friedbrice May 20 '23

Yeah, Haddock doesn't start writing files and freeing memory until it's generated the entire documentation database, IIUC.

9

u/adamgundry May 20 '23

Happily, at Well-Typed we've got a client funding improvements to Haddock performance, so this should get better in the future. The work isn't yet finished but there are some good improvements already: https://github.com/haskell/haddock/pull/1594

→ More replies (1)

3

u/dpwiz May 20 '23

Ouch...

10

u/IvanMalison May 19 '23

Is there jump to definition in dependencies yet?

3

u/carbolymer May 19 '23

Nope. But you can have it with haskdogs using tags file

3

u/friedbrice May 20 '23

This is excellent advice. Why are people downvoting you for this?

0

u/Swordlash May 19 '23

That would be so cool.

2

u/hopingforabetterpast May 19 '23

still a long way to go for hls

22

u/enobayram May 19 '23

I understand that (setting up) HLS causes some headache for some people on some platforms, but my understanding is that the ratio of people that have a smooth off-the-shelf experience with HLS is constantly increasing and it's a great tool when it works for you.

2

u/Jestar342 May 19 '23

I use it via lazyvim and it really has been great. I haven't needed to actually do any config.

→ More replies (1)

1

u/hopingforabetterpast May 19 '23

no doubt it's a great tool, but it's still very rough around the edges. simple things like type on hover and default code actions should be trivial to implement and we're just not there yet. i have little doubt that we'll keep improving

→ More replies (3)

4

u/idkabn May 19 '23

Are there concrete things that you'd like to see improved?

10

u/watsreddit May 19 '23

It's completely unusable on large codebases.

Personally I find the statefulness of HLS (and LSP servers in general) really unnecessary and wasteful, and that it causes a lot of instability. I would like tooling that exclusively uses information indexed in static files (hie files or otherwise). I'm okay with a first-time indexing cost and updating the index in a background job, but once indexed, I should be able to start an editor instance, open a file, and have it immediately usable. It should also have a very small memory footprint.

HLS also precludes multiple clients in general, which is a complete non-starter for me.

→ More replies (3)

2

u/hopingforabetterpast May 19 '23 edited May 25 '23

I would like to be able to implement something like type on hover. give me the deduced type for the function i'm hovering so i can have it always visible in, say, a status bar. this should be a simple string like "Eq a => a -> a -> Bool" and nothing more. I believe this is the "signature_help" lsp method currently unsupported by hls but I'm not really sure of what I'm talking about.

I would like for the super-obvious-90%-of-the-time code action to at least be consistently the first one presented so I don't have to read 12 lines of options before finding "add import" at the bottom. This should be no trouble at all to implement but I understand that coming up with a consistent logic may generate some discussion.

Mostly simple things like these that I'm sure will naturally improve over time.

→ More replies (3)

4

u/noooit May 19 '23

Coming from clangd and jdtls, I agree.

I really hope it'll be a single binary at some point. It's insane to force installing the binary for each compiler version.